Move a triangle through transform, clip, rasterize, and final pixel output.

Example

Move vertices through transform, clip, rasterize, and pixels.

highlighted = computed this step

Step 1 — Input vertices

Set up the exact input values.

vertices((1, 1), (3, 1), (1, 3))\begin{array}{c|c}\text{vertices}&\text{((1, 1), (3, 1), (1, 3))}\end{array}
Pipeline triangle pixelsThe transformed and clipped triangle is rasterized to covered pixels.012345012345

Step 2 — Transform

Compute the highlighted value.

delta and moved vertices((1, 1), ((2, 2), (4, 2), (2, 4)))\begin{array}{c|c}\text{delta and moved vertices}&\hlmath{\text{((1, 1), ((2, 2), (4, 2), (2, 4)))}}\end{array}
Pipeline triangle pixelsThe transformed and clipped triangle is rasterized to covered pixels.012345012345

Step 3 — Clip

State the structural verdict.

clip verdictinside\begin{array}{c|c}\text{clip verdict}&\hlmath{\text{inside}}\end{array}
Pipeline triangle pixelsThe transformed and clipped triangle is rasterized to covered pixels.012345012345

Step 4 — Rasterize

Compute the highlighted value.

covered pixels((2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (4, 2))\begin{array}{c|c}\text{covered pixels}&\hlmath{\text{((2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (4, 2))}}\end{array}
Pipeline triangle pixelsThe transformed and clipped triangle is rasterized to covered pixels.012345012345TTTTTT

Step 5 — Output pixels

State the final pixel set.

final pixels((2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (4, 2))\begin{array}{c|c}\text{final pixels}&\hlmath{\text{((2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (4, 2))}}\end{array}
Pipeline triangle pixelsThe transformed and clipped triangle is rasterized to covered pixels.012345012345TTTTTT
triangle-pipeline-capstone The graphics pipeline is a chain: vertices are transformed, clipped to the viewport, rasterized, and finally written as pixels.