Every video game car, movie creature, and virtual building is covered in textures — flat images wrapped around 3D geometry so convincingly that the seams disappear. The trick that makes it work is deceptively simple: texture mapping.
The core idea is to give every vertex of a 3D mesh a pair of coordinates in the range that point into a flat image called the texture. When the GPU rasterizes a triangle — converts it to screen pixels — it smoothly interpolates the values across the triangle's interior, then looks up the color in the texture at each interpolated coordinate.
But there is a catch. Naive linear interpolation of UV coordinates in screen space produces visible distortion: grid lines bow, text warps, and checkerboard patterns pinch toward the horizon. The fix is perspective-correct interpolation, which divides by the depth before interpolating and multiplies back after. This one adjustment is what separates the blocky software renderers of the early 1990s from the crisp texturing of every GPU since.
Texture mapping was formalized by Ed Catmull in 1974 in his PhD thesis at the University of Utah — the same thesis that introduced the z-buffer. Both ideas became so foundational that today's rasterization pipelines are built on them.
Comments
Loading comments...