Clip space — where it appears
Named by 11 essays across one field — each of them below, with the objects they name alongside it.
The divide is postponed, not avoided
A renderer does not divide by depth. It multiplies by a four-by-four matrix that carries the depth in a fourth coordinate and divides later, and the postponement is not an optimisation — it is what makes clipping and texture interpolation possible at all. The matrix and this site's pinhole put every point on the same pixel to five parts in a hundred trillion.
What happens behind the eye
A point behind the camera has a perfectly plausible image. Dividing by a negative fourth coordinate flips both signs, so the point lands through the principal point on the far side of the frame, and a segment crossing the eye plane is drawn straight, inside the frame, and running in exactly the opposite direction — a direction cosine of −1.0000.
The precision a depth buffer has left
Depth is stored as an affine function of one over the distance, so half of a buffer's codes are spent before the harmonic mean of the near and far planes — twenty centimetres out of a kilometre. The resolution goes as the square of the distance, and the fix that works is not more bits.
A texture does not interpolate on the page
Walking across a drawn surface at a constant rate walks across the real one at a rate that changes, and the worst gap is a closed form in the depth ratio alone — 0.52 at ten to one, more than half the whole range. It is exactly the error a person makes dividing depth by eye, made by a machine, and the fix is the fourth coordinate the pipeline kept.
Four numbers and a window
A projection matrix is built from six numbers and one of them is not a number at all. Four sides carry the focal length and the principal point; the near and far planes move nothing a reader can see; and the bottom row, (0, 0, 1, 0), is the only place the depth divides — set it to (0, 0, 0, 1) and the same machine draws a parallel projection.
The near plane can be any plane
Rewrite one row of a projection matrix and the near plane stops being perpendicular to the axis and becomes whatever plane is asked for. Every x and every y is untouched — it is the same projection of the same scene from the same eye — and the depth order is wrecked, which is a clean separation of the two things a projection matrix does.
One plane is nearly free
The near and far planes enter a depth buffer's precision through 1/near − 1/far, and one of those reciprocals is enormous. Pushing the far plane out by a factor of a thousand costs a tenth of a per cent; bringing the near plane in by the same factor costs a factor of a thousand — and an infinite far plane is the limit of the first rather than a separate case.
A point at infinity is an ordinary vertex
Give a vertex a zero in its fourth slot and it stops being a point and becomes a direction — and the projection matrix draws it anyway, through the same multiply and the same divide, on that direction's vanishing point to seven trillionths of a pixel. Slide the eye ten metres and it does not move. Two of them bound a ground that reaches the horizon, where a ground drawn to ten kilometres stops a fifth of a pixel short.
A texture reaches the horizon as a rate
A ground drawn to infinity cannot carry a texture coordinate at its far corners, because a repeating texture has no coordinate there. It can carry a rate — so many checks per metre along the direction — and a second number that is 1 at points and 0 at directions. Interpolated like every other attribute and divided once, that pair is exact half a pixel from the horizon. Give the same corner a value instead and the ground is drawn in reverse perspective.
A sky is carried as a direction
A triangle of sky has all three vertices at infinity, so the weight that lets a texture reach the horizon is zero everywhere and there is nothing to divide by. The attribute that belongs to such a triangle is the direction itself: carried over w like any other, it is every pixel's own ray to 5e-14 degrees. Carry the vertices' azimuth and elevation instead and a 60° triangle is 7.7° out, a 4096-texel sky needs triangles under ten degrees wide, and a triangle across the seam where azimuth wraps is painted with the opposite sky.
Ground and sky meet at the horizon without a crack
A ground of rate triangles and a sky of direction triangles share their vertices along the horizon, and rasterised as a graphics processor does it — positions snapped to a fraction of a pixel, every centre given to one triangle by the top-left rule — they lose no pixel and claim none twice, at any roll and any snapping. What the horizon does have is a sliver: a centre that falls within half a snapping step of it goes to whichever side the snapped edge puts it, and one that falls exactly on it, rolled one way, is given to the ground at a weight of zero. A ground stopped at a far plane leaves the crack the shared vertex never does: f·h/D rows.
Named alongside it
The objects these essays reach for when they reach for this one.
Homogeneous coordinatesCamera matrixpoint at infinityProjective mapDemonstrationDepth divisionHorizonQuantisationView frustumcentre of projectionConditioningdegrees of freedom