Textures and Materials when Upgrading to 4.2.0-beta


We’re working on upgrading our BJS version to 4.2.0-beta.9, getting ready for the November release. We noticed that our textures are not rendering the same between versions:

The images below are from a playground we created: https://playground.babylonjs.com/#KDWCZY#26.

with version 4.1:

and with version 4.2-beta.9:
version 4-2

We’re not sure what might be causing this. Any ideas?


Adding @Evgeni_Popov who might be able to help on this.

There has been a breaking change regarding the value of indexOfRefraction, see the corresponding section here: Babylon.js/what's new.md at master · BabylonJS/Babylon.js · GitHub

It seems setting 1.8 for indexOfRefraction in 4.2 will you get the same display than in 4.1 with a value of 1 but @sebavan will know more about this.

Actually setting an indexOfRefraction to 1 was before having no impact which is not usual and was a bug. The easiest in your case should be to not set it at all :slight_smile:

Can you explain this a little further? I’m unclear what the root-level IOR does that is different in the shader than the subsurface IOR or the subsurface volume IOR? I think we only set the root-level IOR in an attempt to get the two textures to look the same in both versions of Babylon.

I’m also noticing a difference in the metallic workflow. The metallicF0Factor seems to have a lesser effect as well. Is this expected?