The title kind of says it all; i need to show a sliced cross section of my geometry.
So far i’m using the clip plane and stencil buffer (with GL_INVERT) together for this. That generates the right cross section, and looks pretty good, as long as nothing overlaps.
When things do overlap, it of course double-inverts, causing the overlapped areas to be turned off. So far i can’t fix this without it getting messed up by various solids that are not clipped (ie not part of the desired cross section)
Does anyone here know some stencil buffer magic (or any approach i guess) to ignore anything not cut by the clip plane, but also properly handle overlapping geometry?