Graphics / Reference / The rasterizer stage
The rasterizer stage
The rasterizer converts vector primitives such as triangles into fragments and interpolates any varying vertex attributes across them. In the simplified pipeline used here, fragment tests and framebuffer output follow this stage.
Rasterisation is handled automatically by the graphics system after vertex processing and primitive formation. For a triangle, it determines which raster samples are covered and generates fragments corresponding to those covered samples.
If vertex attributes such as colour, texture coordinates or normals are present for interpolation, corresponding values are interpolated across the primitive so each generated fragment receives appropriate per-fragment values.
After rasterisation, later per-fragment operations include tests such as depth and stencil before surviving fragment results contribute to the framebuffer. These tests determine whether a generated fragment is accepted based on stored framebuffer-related state.
The rasterizer therefore bridges vector geometry and fragment processing: its input is an assembled primitive described by transformed vertices, and its output is a set of fragments with interpolated attributes where applicable. A fragment is a candidate contribution associated with a covered raster sample; it is not itself the stored framebuffer pixel. The triangle tracer used in the learning experiences visualises the coverage part of this process as the triangle is converted from edges and area into discrete raster samples.
Builds on
Read
- Read the chapter: The rasterizer stage