engine
engine copied to clipboard
Add support for KHR_materials_volume
Fixes #3651
Adds support for light attenuation and medium thickness to be used with refractive (light transmitting) volumes and surfaces. Also adds support for KHR_materials_volume.
Furthermore, increases the complexity of the refraction function to sample from the scene grab pass in order to have dynamic refractions.
It's more than that too. We don't refract with the environment map in this one, but use the grab pass result. But yes, I think there should be a flag to switch between volumetric refractions and the old.
The new refraction code is now behind a flag, useDynamicRefractions, which is enabled in the GLB loader by default.
This looks awesome!
Please also add the chunk change to chunk-validation.js and update the developer chunk docs.
Github supports video on the PR description .. please attach one.