IT lexicon › Programming › Cubemap

Cubemap

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

Six square textures arranged as the faces of a cube, sampled with a direction vector instead of ordinary 2D coordinates.

A ray from the centre out through a point lands on the right face and texel, which makes the format perfect for anything that depends on direction rather than surface: a skybox, mirror-like reflections of the surroundings, image-based lighting, and point-light shadows in every direction at once. Hardware support arrived with the GeForce 256 and DirectX 7 around 1999.

The "dynamic cubemap" variant re-renders the six faces every frame from an object's position for moving reflections — expensive, so they are often baked instead. Smaller, pre-filtered cubemaps serve as irradiance probes for diffuse lighting.

← Back to the lexicon