Cube mapping

From Wikipedia, the free encyclopedia

Jump to: navigation, search
A rendering showing an original scene (lower left), the six faces of the cube (top), and the cube superimposed on the original scene (lower right).

In computer graphics, cube mapping is a technique that takes a three dimensional texture coordinate and returns a texel from a given cube map (something similar to a skybox). The texture represents the appearance of six faces of a perfectly mirrored cube as seen from vantage points in each of the six cardinal directions. The texture coordinate is a vector that specifies which way to look from the center of the cube mapped cube to get the desired texel.

Cube mapping is usually preferred over the older Sphere mapping technique because the more even texel sample density causes less distortion, allowing a lower resolution map to be used. It is also simpler to dynamically generate a cube map for realtime simulated reflections.

[edit] See also