I've implemented a clipping and capping view similar to the example called "simplecap.zip" in this page:


enter image description here

This uses the stencil buffer to find the pixels drawn from inside the shape and fill them with a plane.

I'm not looking for a way to outline the clipping cap with a constant width line.

enter image description here

Obviously I can't just draw it since the clipping polygon is not actual geometry that I have. I've tried coming up with some more stencil buffer magic but couldn't figure out how to do it

  • \$\begingroup\$ this is mean you want to draw yellow line where stencil clipped? can you extrude stencil mask? so if it's possible you can extrude it then render result as yellow line \$\endgroup\$ – Seyed Morteza Kamali Dec 28 '18 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.