https://playground.babylonjs.com/#GTRC2Q#61
I have this playground setup with a Fragment/Vertex shader, the vertex shader appears to be working as desired. However, for some reason, some of the boxes are being drawn behind the others when their positions in the world are in fact in front of others. I’m not sure what is going on here.
the same example using a NodeMaterial is working https://playground.babylonjs.com/#M38M3I#20
I would like to use the NodeMaterial but I need to adjust the texture per instance so I need to rely on a raw shader and instance buffers to pass in the scale and position of the texture (unless there is a way to do that with the NodeMaterial but I was not able to figure it out).