IT lexicon › Programming › Surface cache

Surface cache

Programming På svenska → Updated: 2026-10-26

Quake's way of getting lit walls out of a software renderer: bake texture and lightmap together into ready-made surfaces, cache them, and let the inner loop do nothing but copy.

Quake (1996) had soft, precomputed lighting stored in lightmaps, but blending light into the texture for every pixel of every frame was too much for a Pentium. John Carmack and Michael Abrash turned the problem inside out: each visible surface was built once as a lit bitmap, at the mip level its distance called for, and kept in a cache. Rasterisation became plain texture mapping with no lighting maths at all.

The cost was memory, plus hitches whenever lots of new surfaces appeared at once, say after a quick turn. GLQuake replaced the scheme with multi-pass blending on 3D cards. The idea survives in disguise: Lumen in Unreal Engine 5 also builds a surface cache, this time for global illumination.

← Back to the lexicon