I'm looking for the best way to render the outline for a cap of a sliced object.
To illustrate what I mean let's use this example from threejs: https://threejs.org/examples/?q=clip#webgl_clipping_stencil
and set it up such that we slice it only from one end like so:
This example uses the stencil buffer to generate the pink cap which is rendered onto a plane. I want to see just this cap, so if we turn off the object itself we get this:
But we're not there yet, because I want not the cap, but the outline of this cap, like in this fabricobbled example:
And that is where I'm not sure what direction to take. Since the caps are rendered on a plane, most existing outline techniques won't work, since that will give me the outlines of the plane. I could maybe do some sort of edge finding on the stencil, but there's probably a smarter and better way.