IT lexicon › Programming › Box projection

Box projection

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

A correction that makes cubemap reflections line up with a room's walls instead of appearing infinitely far away.

An ordinary cubemap assumes the surroundings lie infinitely far off, so a reflection in the floor points the wrong way the moment the surface is near a wall. The correction defines a bounding box around the room and projects the reflection ray against the box's sides before the cubemap lookup is made.

The result is local reflections that sit where they belong in a rectangular room — tiles, windows and edges land correctly. The technique was described by Lagarde in 2012 and is used with reflection probes in Unity and Unreal. It works best for box-shaped rooms; curved geometry gives the approximation away.

← Back to the lexicon