NodeMaterial Texture UV Scaling bug

Hi

I just tried to migrate my app to BabylonJS version 5 and I found a weird bug.

I got NodeMaterial that has texture in it in which I set up Scaling UV with TextureBlok UI. But when the scale is different than 1, I see the error in the console:

Shader compilation error: FRAGMENT SHADER ERROR: 0:123: ‘tempTextureRead’ : undeclared identifier ERROR: 0:123: ‘rgb’ : field selection requires structure, vector, or interface block on left hand side ERROR: 0:123: ‘=’ : dimension mismatch ERROR: 0:123: ‘=’ : cannot convert from ‘highp float’ to ‘highp 3-component vector of float’

I made a PG demonstrating the bug.

https://playground.babylonjs.com/#Z4K2QY

But also it’s not going away when you just set the value back. You need to reconnect the Texture UV block to make it work back. I made a screen recording to demonstrate this:

But also to avoid this error you can also do just this:

https://playground.babylonjs.com/#Z4K2QY#1

But this is just not practical and you got UI that is throwing this but it worked in version 4.2.

Regards
Peter

Let me check that :slight_smile:

Ok it will be fixed with next nightly