Overlay flat shapes

It’s not impossible, but it’s tricky. There was another thread on this recently, I believe–I think that it might have been this one; perhaps you’ll find some answers there.

However, I suspect that there may be a simpler solution available in your case.

Hmm… Given what you describe, perhaps it might work better to re-enable depth -writing/-testing if you’ve disabled it, and to instead use a depth offset to prevent the depth-fighting that seems to have been the original problem. (Along with using culling bins to enforce rendering order, as mentioned previously.)

This can be done by calling “setDepthOffset(<some value>)” (see the API here) on the object that should render in front of the other. The value of “<some value>” is an integer; experiment to see what sort of value works for your scene, starting with a value of 1.

1 Like