Refractive Textures in 4.2.0-alpha.29


We’re trying out the latest release, and we’re seeing some different behavior with refractive textures that we’re using. We’re seeing a kinda of white sheen or reflection obscuring the refraction on curved surfaces. Do you know what change might be causing this?



Hello this is tough to help without a repro

You can use the playground for that as you can change the version in use to compare

I wish I could share the repo I’m working on…
I can tell you that the breaking change is in v4.2.0-alpha.18. Our refractive textures show as expected with alpha.17, but start acting strange with alpha.18. I’ll try to dig in more and see if I can narrow it down further.


I managed to narrow it down. We are currently creating refractiveTextures and applying them to materials along with subsurface properties on particular meshes. We are manually setting those subsurface properties, and resetting them when needed. Looking into the Babylon code, it looks like the PBRSubsurfaceConfiguration class is now handling much of this, and introduces a new volumeIndexOfRefraction. This new property seems to affect refraction differently than it was, and we’re having a hard time seeing how we can consistently replicate what we’ve been doing without that property.

Is there anything you can tell me about how to use this new way of configuring subsurface/refractive properties, and perhaps why the change was made?


Pinging @sebavan

The only behavior we fixed it we were before not using indexOfRefraction but ETA which like 1/indexOfRefraction for a model in an air medium.

Could you try simply setting 1/value instead of value in your previous code ?

Which is the value that should be set to 1/value? We are currently setting indexOfRefraction to 1.01 on our refractive subsurfaces, and volumeIndexOfRefraction to null. So, setting these to 1/value doesn’t change anything for us.

Also, what is ETA?

1 Like