Jit.gl.mesh depth artifacts

thomas.goepfer's icon

Drawing few superimposed quads at the same coordinates with one jit.gl.mesh, produces some artifacts like this:

I expect this is related with depth management. But depth management is between several "max" objects, like 2 jit.gl.mesh. How to manage this with several objects in one jit.gl.mesh ? Removing depth_write or depth_enable will messed up objects in different Z position in one jit.gl.mesh.

(Here an example with a background quad, and 2 quads at the same coordinates, in the foreground)

Max Patch
Copy patch and select New From Clipboard in Max.

_TG

Rob Ramirez's icon

you either need to disable depth, or add a small amount of z value to each quad