Learning path

Full curriculum

Full curriculum

Unit content

Programmable rasterization pipelines and shaders

Modern real-time graphics exposes parts of the rasterization pipeline as small programs called shaders.

A simplified pipeline is:

  1. fetch vertex data;
  2. run a vertex shader to transform each vertex and produce attributes;
  3. assemble and clip primitives;
  4. rasterize them into fragments;
  5. interpolate vertex attributes;
  6. run a fragment shader to compute per-fragment outputs;
  7. apply visibility and blending tests to update framebuffer attachments.

The vertex and fragment stages execute many independent invocations over large collections of vertices or fragments. This data-parallel structure is one reason graphics processors are effective for raster rendering.

A shader does not normally decide which triangle covers which pixel; fixed-function rasterization performs that geometric sampling between the programmable stages.

Graphics APIs differ in syntax and exact stage names, but the conceptual division between data buffers, programmable transformation/shading, rasterization and framebuffer operations is portable across APIs.