IT lexicon › Hardware › Octahedral encoding

Octahedral encoding

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

Packs a unit normal into two numbers by folding the unit sphere onto an octahedron unwrapped across a square.

A surface normal is a unit vector — three components but only two degrees of freedom, so storing all three wastes space, especially in a cramped G-buffer. Octahedral encoding projects the sphere onto an octahedron, unwraps it into a unit square, and stores those two coordinates instead. Precision is nearly uniform across the whole sphere, and the encode and decode are a few lines of arithmetic with no trigonometry — cheaper and more even than the older spheremap transform it replaced. Popularised by Cigolle et al. in their 2014 survey of compact unit-vector representations, it is now the default way to squeeze normals into two 8- or 16-bit channels.

← Back to the lexicon