Shader texture changing problem

I managed to finally recreate a problem in the playground regarding shaders. For some reason the NodeMaterial I have attached to meshes in my scene is using a textureSampler from another ShaderMaterial. You can see in the playground below that occasionally the texture of the shields will switch. I’m assuming it has something to do with the depth of the objects in the scene and the order which they are drawn.

If I turn off needAlphaBlending in the ShaderMaterial the texture problem is fixed but then I don’t get proper alpha blending on the laser effect and it just fills in white for the transparent parts. Is there something I’m doing wrong here?

Definitely a bug! I’m on it

Ok found and will be fixed in next nightly

1 Like

Thanks! I was going crazy trying to figure out what I did wrong with the texture setting!

fixed was pushed


Has this fixed been pushed to the latest preview build for @babylonjs/core on npm?

not yet. Next npm update will probably be this friday

Actually I might need to do one today :slight_smile: I ll keep you posted

4.2.0-alpha.10 is out