Problem with CustomProceduralTexture method limiting the number of input Rendertargets

I am using the “new BABYLON.CustomProceduralTexture” method to process images and have assigned a shader to it.

The problem is: after inputting 30 images, the shader doesn’t seem to be able to fully utilize (texture2D) them.

The result is that I can only texture2D 16 RTs (up to RT15, at which point the proceduraltexture output is correct), as the image below:

But when I add: totalColor += texture2D(RT16, vUV).rgb;, the output is wrong.

How can I fix this so that I can use all 30 input RTs in the shader?

playground project here: Customprocedualtexture problem | Babylon.js Playground (

Thank you very much!

Closing because duplicate of:

1 Like