Expose worldNormal input in NodeMaterial ClearCoatBlock

Could a worldNormal input be added to ClearCoatBlock as a new optional parameter? If it isn’t connected then a PBRMetallicRoughnessBlock worldNormal is used instead like it currently does always.

Right now only way to apply perturbedNormal to clear coat in NME is to send a normal map color as input. However, it is possible that there are other changes to the normal than just a normal map. For example in my case normal can also be affected by height based “bump maps”, so I have no other way to make clearcoat include all surface bumps than to feed perturbedNormal to both PBRMetallicRoughnessBlock worldNormal AND perturbedNormal inputs.

It should be mostly matter of exposing this variable here like the position above: Babylon.js/clearCoatBlock.ts at 38d9baea7bf81f6ef293f736daaca45c6a9102b0 · BabylonJS/Babylon.js · GitHub

cc @sebavan and @Evgeni_Popov

I guess I have the code locally but I kinda broke my devenv :slight_smile:

I ll push the enhancement tomorrow

Will be available in Add normal input to clear coat Block by sebavan · Pull Request #12388 · BabylonJS/Babylon.js · GitHub

1 Like