I'm trying to draw vectorlike lines on a cube that are generated from object intersections. My first take was to use the depth of the cube as a comparison to the pixel depth of the objects that should intersect with the cube: The result is correct lines, but with different thickness. Especially the cylinder (circle at the top) has some very thin parts, because the cylinder geometry looks in the direction of the camera, and therefore only few pixels are found that have a similar depth to the cube depth. Another thought of mine was to use two materials, to get the area of the intersection, in order to use a post processing effect to generate the lines. One Material renders with Front Face culling and a greaterEqual ZTest, the other one Backface Culling and a LessEqualTest: The purple area of the circle looks quite good, but the concave shape at the bottom shows a problem: There is an overlapping area that is purple but is outside of the actual intersection. Another possibility would be decals/projectors, but I would like to have a break in the line when moving around a corner. The last though I had was to calculate the intersection on the CPU. However, I fear to hit a performance issue when calculating everything on the CPU for hundreds of objects. I'm wondering: Is there maybe an interesting usecase for geometry shaders to get a better result. Or is there another combination of stencil shaders with which I can get the intersection for concave objects. Target platform is windows and I'm quite flexible on how to solve it, so there is a lot of wiggle room here. I hope I'm missing some shader solution I haven't thought of.