There’s
a special piece of hardware between the vertex shader and the fragment
shader: the Rasterizer
- it decides which pixels in the window are affected by the incoming
geometric primitive
- for our triangle, the rasterizer “generates” all of the
fragments inside the triangle
Graphics Pipeline showing the
Rasterizer
Rasterizer as a linear
interpolator
- computes the intermediate colors for all fragments inside the
geometric primitive
- uses the values specified from the vertex shader as the values to
interpolate
- assigns the interpolated value to the fragment shader’s varying
variable