ShaderMaterial - mixing up texture and texture array

There’s something strange going on with ShaderMaterial when using both a texture array and an individual texture.

This first playground uses just a texture array of red, blue and green texture, and work ok:

The second playground uses a texture array of red and blue, and an individual texture for green:

As you can see, there’s no green color, just blue and red.

The funky thing is, when switching the order of setTextureArray and setTexture, the result is again different, as you can see in the third playground. Now there’s no blue, but green takes over.

Is this a bug or am doing something wrong?


Hello and welcome!
I’ll have a look asap to see what is going wrong

Ok bug found…Will be fixed by next nightly

Amazing thank you @Deltakosh for such a fast fix!

1 Like

Thank you for having found the bug;)

1 Like