Rasterization

Rasterization is the process of converting geometric primitives described as vectors, typically triangles defined by their vertices, into a grid of pixels suitable for a raster display. It is the workhorse of real-time computer graphics: nearly every game and interactive three dimensional application draws its frames by rasterizing millions of triangles many times per second. The term contrasts with ray tracing, which works backward from the image plane along light paths; rasterization instead works forward, projecting each primitive onto the screen and filling in the pixels it covers.

The core step is scan conversion. After the vertices of a triangle are transformed into screen space, the rasterizer determines which pixels, or more precisely which pixel sample points, fall inside the triangle, and generates a fragment for each one. Per vertex quantities such as depth, color, texture coordinates, and surface normals are interpolated across the interior of the triangle so that every fragment carries the attributes appropriate to its position. The OpenGL specification defines this precisely: rasterization is the stage that produces a two dimensional set of fragments, each with a window coordinate and associated data, from a projected primitive, and it specifies the point sampling rules that decide which fragments are produced.

Rasterization on its own only determines coverage; it does not resolve which surface is visible when several triangles project to the same pixel. That hidden surface problem is handled separately, most commonly by the depth buffer, or z-buffer, which keeps the nearest depth seen at each pixel and discards fragments that lie behind it. Color is written into the framebuffer, the block of memory that holds the image being assembled. Texture mapping, blending, and per fragment shading all operate on the fragments that rasterization emits.

Modern graphics hardware implements rasterization as a fixed function stage wedged between programmable shader stages. Vertex shaders transform and project geometry, the rasterizer turns primitives into fragments, and fragment, or pixel, shaders compute the final color of each fragment. Because the rasterizer is a fixed and highly parallel operation, GPUs implement it in dedicated silicon that can process enormous numbers of triangles and fragments concurrently, which is the main reason rasterization remains far cheaper per frame than tracing rays.

The behavior of rasterization is pinned down by the specifications of the major graphics APIs. The OpenGL core profile specification devotes an entire chapter to rasterization, defining how points, lines, and polygons are sampled, how fragment attributes are interpolated, and how multisampling affects coverage; Direct3D defines an equivalent rasterization stage. These specifications are the authoritative description of how vector geometry becomes pixels in practice.

Sources

Last verified June 8, 2026