Stencil buffer

A stencil buffer is an extra data buffer, in addition to the color buffer and Z-buffer, found on modern graphics hardware. The buffer is per pixel and works on integer values, usually with a depth of one byte per pixel. The Z-buffer and stencil buffer often share the same area in the RAM of the graphics hardware. The most typical application is still to add shadows to 3D applications. It is also used for planar reflections. The stencil buffer and its modifiers can be accessed in computer graphics by using APIs like OpenGL, Direct3D or Vulkan.

Stencil buffer

A stencil buffer is an extra data buffer, in addition to the color buffer and Z-buffer, found on modern graphics hardware. The buffer is per pixel and works on integer values, usually with a depth of one byte per pixel. The Z-buffer and stencil buffer often share the same area in the RAM of the graphics hardware. The most typical application is still to add shadows to 3D applications. It is also used for planar reflections. The stencil buffer and its modifiers can be accessed in computer graphics by using APIs like OpenGL, Direct3D or Vulkan.