15.1

Rasterization Pipeline

Step through the graphics pipeline from vertex input to final pixel output. Watch how 3D triangles are transformed, clipped, and rasterized into colored pixels on a framebuffer grid.

Computer Graphics
Scenarios:
VIn
Vertex Input
VS
Vertex Shader
Clip
Clipping
Proj
Projection
Rast
Rasterization
FS
Fragment Shader
FB
Framebuffer
Pixel Grid (20x20)
Stage: Vertex Input
Empty
Covered
Interpolated
StageVIn
Vertices3
Pixels Hit72
Steps0
Vertex Data
V0(0.0, 1.2, 0.0)
V1(-1.0, -0.8, 0.0)
V2(1.0, -0.8, 0.0)
Vertex InputRaw vertex data is loaded from memory. Each vertex has a 3D position (x, y, z) and attributes like color. The GPU reads this data from vertex buffers.
Vertex Colors
V0: rgb(239, 68, 68)
V1: rgb(34, 197, 94)
V2: rgb(59, 130, 246)
1.0x
Understanding the Rasterization Pipeline

How It Works

The rasterization pipeline is the process by which 3D geometry is converted into 2D pixels on your screen. Every frame in a real-time graphics application (games, UI) goes through these stages. Modern GPUs execute this pipeline billions of times per second, processing millions of triangles in parallel.

Pipeline Stages

Vertex Input
Vertex Shader
Clipping
Projection
Rasterization
Fragment Shader
Framebuffer
Key InsightRasterization is fundamentally different from ray tracing. While ray tracing traces rays from the camera through each pixel into the scene, rasterization projects each triangle onto the screen and fills in covered pixels. This "object-order" approach is much faster for most scenes, which is why real-time graphics (games) primarily use rasterization. Modern GPUs have dedicated fixed-function hardware for the rasterization stage.

Stage Summary

StageInputOutputProgrammable
Vertex InputVertex buffersRaw verticesFixed
Vertex Shader3D positionsClip coordinatesYes
ClippingClip coordsClipped primitivesFixed
ProjectionClip coordsScreen coordsFixed
RasterizationScreen trianglesFragmentsFixed
Fragment ShaderFragmentsPixel colorsYes
FramebufferPixel colorsFinal imageFixed