Stencil buffer

Stencil buffer

A stencil buffer is an extra buffer, in addition to the "color buffer" (pixel buffer) and "depth buffer" (z-buffering) found on modern computer graphics hardware. The buffer is per pixel, and works on integer values, usually with a depth of one byte per pixel. The depth buffer and stencil buffer often share the same area in the RAM of the graphics hardware.

In the simplest case, the stencil buffer is used to limit the area of rendering (stenciling). More advanced usage of the stencil buffer make use of the strong connection between the depth buffer and the stencil buffer in the rendering pipeline (for example, stencil values can be automatically increased/decreased for every pixel that failed or passed the depth test).

The simple combination of depth test and stencil modifiers make a vast number of effects possible (such as shadows, outline drawing or highlighting of intersections between complex primitives) though they often require several rendering passes and, therefore, can put a heavy load on the graphics hardware.

The most typical application is still to add shadows to 3D applications. It is also used for planar reflections.

Other rendering techniques, such as portal rendering, use the stencil buffer in other ways; for example, it can be used to find the area of the screen obscured by a portal and re-render those pixels correctly.

The stencil buffer and its modifiers can be accessed in computer graphics APIs like OpenGL and Direct3D.

ee also

* Z-buffering (depth buffer)
* Shadow volume (a stencil buffer technique creating shadows)


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Data buffer — In computer science, a buffer is a region of a physical memory storage used to temporarily hold data while it is being moved from one place to another. Typically, the data is stored in a buffer as it is retrieved from an input device (such as a… …   Wikipedia

  • Shadow volume — Example of Carmack s stencil shadowing in Doom 3. Shadow volume is a technique used in 3D computer graphics to add shadows to a rendered scene. They were first proposed by Frank Crow in 1977[1] as the geometry describing the 3D shape of the… …   Wikipedia

  • Rasterisation — Rastérisation La rastérisation est un procédé qui consiste à convertir une image vectorielle en une image matricielle destinée à être affichée sur un écran ou imprimée par un matériel d impression. Les scènes en 3D dimensions étant généralement… …   Wikipédia en Français

  • Rastérisation — La rastérisation est un procédé qui consiste à convertir une image vectorielle en une image matricielle destinée à être affichée sur un écran ou imprimée par un matériel d impression. Les scènes en 3 dimensions étant généralement stockées en… …   Wikipédia en Français

  • Direct3D — is part of Microsoft s DirectX API. Direct3D is only available for Microsoft s various Windows operating systems (Windows 95 and above) and is the base for the graphics API on the Xbox and Xbox 360 console systems. Direct3D is used to render… …   Wikipedia

  • Mask (computing) — Signal masking redirects here. For other uses, see Masking (disambiguation). In computer science, a mask is data that is used for bitwise operations. Using a mask, multiple bits in a byte, nibble, word (etc.) can be set either on, off or inverted …   Wikipedia

  • Full screen effect — A full screen effect (also known as a fullscreen effect) is a graphics technique that is applied to the entire screen, usually in postprocessing stage. These effects are often used in real time applications such as: Video games, computer games,… …   Wikipedia

  • Framebuffer Object — The frame buffer object architecture (FBO) is an extension to OpenGL for doing flexible off screen rendering, including rendering to a texture. By capturing images that would normally be drawn to the screen, it can be used to implement a large… …   Wikipedia

  • Z-fighting — is a phenomenon in 3D rendering that occurs when two or more primitives have similar values in the z buffer, and is particularly prevalent with coplanar polygons. The effect causes pseudo random pixels to be rendered with the color of one polygon …   Wikipedia

  • Opengl — Entwickler: Khronos Group Aktuelle Version: 3.1 (24. März 2009) Betriebssystem: plattformunabhängig Kategorie …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”