Weird artifact when drawing immediate mode lines over instanced geometry
Unity 2021.2.11f
The tourqouise circles is made of line segments that are drawn with the immediate mode API (as a workaround for https://shapes.userecho.com/en/communities/1/topics/325-hdrp-single-pass-instanced-rendering-not-working?page=1#comment-1151 apparently lines work?). The red/yellow/purple background are boxes that are drawn with Graphics.DrawMeshInstancedIndirect. The geometry is physically behind the line, but either gets rendered in front of the line or this weird pixelated/dithered effect appears.
This screenshot is not from a VR session, though the problem is the same for VR.
I suspect this has something to do with depth sorting and I fear there might not be an easy workaround, but I would be happy for any input.
looks like standard Z-fighting to me! they're simply at the same depth, and making them not be on the same depth (or use some other blend mode than opaque) should solve it