Stencil buffer guide or tutorial

Not exactly certain this is the right forum for this. I am trying to obtain a thorough understanding of the different results (operations) one can obtain using the stencil buffer functions but I have not found a good source. Can anyone point out somewhere (written or website) that includes various examples on the use of the stencil operations I just have not been able to find one.
Thank you for your help.


You might check out:

Thank you @Dark_Photon ! I am familiar with this tutorial… many others also focus on producing outlines. I was trying to find whether there is something out there more expansive. I have not been successful at finding something that would provide more examples and being a bit more thorough given what appear could be the possibilities.

The old SGI advanced techniques are a little hard to find (especially when links are broken) but there are five or six stencil use-case examples there. More recent ones are two sided stencil shadow volumes, stencil routed K-buffer, and path rendering (if you’re looking to understand use-cases, don’t limit your searches to only OpenGL API.)

Many thanks @arekkusu I will look this up. Yes, I am sure that I not been using the right keywords in my search because not much different came up.
Thanks again for the links!