Concept

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. In the simplest case, the stencil buffer is used to limit the area of rendering (stenciling). More advanced usage of the stencil buffer makes use of the strong connection between the Z-buffer and the stencil buffer in the rendering pipeline. For example, stencil values can be automatically increased/decreased for every pixel that fails or passes the depth test. The simple combination of depth test and stencil modifiers make a vast number of effects possible (such as stencil shadow volumes, Two-Sided Stencil, compositing, decaling, dissolves, fades, swipes, silhouettes, 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 by using APIs like OpenGL, Direct3D, or Vulkan. The stencil buffer typically shares the same memory space as the Z-buffer, and typically the ratio is 24 bits for Z-buffer + 8 bits for stencil buffer or, in the past, 15 bits for Z-buffer + 1 bit for stencil buffer. Another variant is 4 + 24, where 28 of the 32 bits are used and 4 ignored. Stencil and Z-buffers are part of the frame buffer, coupled to the color buffer. The first chip available to a wider market was 3Dlabs' Permedia II, which supported a one-bit stencil buffer.

About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related lectures (19)
Rasterization: Z-Buffer Quiz
Covers the concept of Z-Buffer and its role in the rasterization pipeline.
Rasterization and Transformations
Covers transforming surface normals, forced perspective, shading algorithms, and input values computation in fragment shaders.
VGA Adapter
Covers the design of a VGA Adapter for a Pong game project and explains the VGA interface architecture and video signal generation options.
Show more
Related publications (32)

Nanobridge Stencil Enabling High Resolution Arbitrarily Shaped Metallic Thin Films on Various Substrates

Jürgen Brugger, Giovanni Boero, Yi-Chiang Sun

Stencil lithography (SL), which uses a perforated membrane as a reusable shadow mask to locally add material patterns on substrates provides a simple but versatile approach for the fabrication of functional devices on a large variety of substrate materials ...
WILEY2022

Perimeter Control and Route Guidance of Multi-Region MFD Systems With Boundary Queues Using Colored Petri Nets

Nikolaos Geroliminis, Anastasios Kouvelas, Hui Fu

Perimeter control based on Macroscopic Fundamental Diagram (MFD) aims to meter the number of transferring vehicles at the periphery of the protected urban region in order to obtain the desired number of vehicles in that region. The advantage of perimeter c ...
IEEE-INST ELECTRICAL ELECTRONICS ENGINEERS INC2021

Airline customers connection time preferences in domestic U.S. markets

Michel Bierlaire, Virginie Janine Camille Lurkin

Within the United States, there have been evolving perceptions on the benefits and disadvantages of using peaked flight schedules. Arguments in favor of using peaked schedules have centered on a traditional assumption that consumers prefer itineraries with ...
2019
Show more
Related concepts (5)
Shadow mapping
Shadow mapping or shadowing projection is a process by which shadows are added to 3D computer graphics. This concept was introduced by Lance Williams in 1978, in a paper entitled "Casting curved shadows on curved surfaces." Since then, it has been used both in pre-rendered and realtime scenes in many console and PC games. Shadows are created by testing whether a pixel is visible from the light source, by comparing the pixel to a z-buffer or depth image of the light source's view, stored in the form of a texture.
Glossary of computer graphics
This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms.
Graphics pipeline
The computer graphics pipeline, also known as the rendering pipeline or graphics pipeline, is a fundamental framework within computer graphics that outlines the necessary procedures for transforming a three-dimensional (3D) scene into a two-dimensional (2D) representation on a screen. Once a 3D model is generated, whether it's for a video game or any other form of 3D computer animation, the graphics pipeline becomes instrumental in converting the model into a visually perceivable format on the computer display.
Show more

Graph Chatbot

Chat with Graph Search

Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.

DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.