Stencil Testing
Similar to Depth Testing but
- Compares current reference value to pixel’s stencil buffer value
- Same comparison functions as depth test:
- NEVER, ALWAYS
- LESS, LEQUAL
- GREATER, GEQUAL
- EQUAL, NOTEQUAL
- Stencil bit mask controls comparison
- (( ref & mask ) op ( svalue & mask )