Shader compilation fails if a NodeMaterial contains Multiple TriPlanar nodes

Regression introduced in 6.2.0. If a NodeMaterial contains multiple TriPlanar nodes, the shader will fail to compile.

Here’s what I think is happening: The generated GLSL will try to redefine existing variable names over and over again, causing compilation errors at least in Chrome 112.0.5615.140. The same material compiled fine in older engine versions.

This is a simple NodeMaterial to reproduce the issue: Babylon.js Node Material Editor

Yes, sorry, it is fixed by:

5 Likes

Hehe, that was switft. Thanks for the info!

Confirming: update 6.3.0 is on CDN already and it fixes this.

If any of you run into this same issue, switch to any other version but 6.2.0.

1 Like