engine icon indicating copy to clipboard operation
engine copied to clipboard

Add support for KHR_materials_volume

Open GSterbrant opened this issue 2 years ago • 2 comments

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.

image

GSterbrant avatar Jul 28 '22 15:07 GSterbrant

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.

GSterbrant avatar Jul 29 '22 13:07 GSterbrant

The new refraction code is now behind a flag, useDynamicRefractions, which is enabled in the GLB loader by default.

GSterbrant avatar Aug 04 '22 16:08 GSterbrant

This looks awesome!

Please also add the chunk change to chunk-validation.js and update the developer chunk docs.

slimbuck avatar Aug 11 '22 08:08 slimbuck

Github supports video on the PR description .. please attach one.

mvaligursky avatar Aug 11 '22 08:08 mvaligursky