4.6k words | Dan Hollick
Shaders.
Shaders are compact programs that decide where geometry appears and what colour every generated fragment should become.

Shaders are compact programs that decide where geometry appears and what colour every generated fragment should become. The apparent simplicity comes from a set of carefully chosen representations, transformations and physical assumptions working together.
Vertex stage
Each vertex is moved from model coordinates through the camera and into clip space.
This is one part of a longer chain: attributes becomes vertex shader becomes rasteriser becomes fragment shader. The useful abstraction hides the physical work, but the underlying constraints still shape the software built above it.
Interpolation
Values are smoothly mixed across triangles before the fragment stage runs.
The implementation is full of compromises. Precision, speed, storage and energy rarely improve together, so practical systems choose the errors people are least likely to notice.
Fragment stage
Material, texture and lighting calculations produce a colour and depth for each sample.
Once this layer is visible, familiar design conventions stop looking arbitrary. They are accumulated responses to the capabilities and limits of the machinery below.
A visual study based on the original chapter. Text is condensed and rewritten.