IT lexicon › Programming › Spherical harmonics

Spherical harmonics

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

A frequency-domain basis for functions on a sphere, used in graphics to store a whole environment's low-frequency lighting in a handful of numbers.

Any function defined over directions — such as the incoming light at a point — can be approximated as a weighted sum of these basis functions, the spherical analogue of a Fourier series. Keeping only the first few bands captures smooth, diffuse lighting in as few as nine coefficients per colour, which is exactly what light probes and irradiance volumes store. Evaluating the lighting then costs a cheap dot product rather than sampling a cubemap. The maths predates computers (Laplace, 1782); Ravi Ramamoorthi and Pat Hanrahan brought it into real-time rendering in 2001. It cannot represent sharp shadows or reflections — only the soft, ambient term.

← Back to the lexicon