Render artifacts with KHR_materials_volume and KHR_materials_transmission

I’ve been playing around with KHR_materials_volume and KHR_materials_transmission in the sandbox (v5.0.0-alpha.24). I’m running into a rendering issue when I define both a transmissionTexture and a thicknessTexture.

If I remove either one of them (and rely on the transmissionFactor and/or thicknessFactor instead) the rendering artifacts seems to go away.

Here’s an example that demonstrates the issue - this sample defines both the transmissionTexture and the thicknessTexture. The transmission texture is all white (255, 255, 255), so I would expect the sphere to be fully transparent, but that’s not the case.
[Download]

For reference, here’s a version where I removed the transmissionTexture, which appears to work around the issue:
[Download]

I’m unable to reproduce this issue using the Khronos glTF sample viewer.

Thanks!

Welcome to the forum, @Evgeni_Popov could you have a look ?

Actually in Babylon we only have one texture to hold on thickness + mask so if you use the different textures in both extensions, or even one of them it would end up being impacting the others.

In gltf translucency, transmission, thickness can be splitted samplers which is the issue here.

Your best workaround would be to store the thickness in the green chan, and the transmission in the red one. Then you can use this texture in both extensions, it is a workaround for now waiting to check how we ll address it in the team.

2 Likes

Works perfectly. Thanks for the quick response!