April 15, 2026

Spheres, cheers, and comment jeers

Introduction to Spherical Harmonics for Graphics Programmers

Game lighting math sparks 'compression vs clarity' fight as audio folks crash the thread

TLDR: A clear intro shows how a few numbers can approximate complex, all‑around lighting. Commenters spar over whether it’s mainly compression, ask for real‑number explanations, and point out it also powers 3D audio—wondering if games will ever actually use that surround‑sound trick.

A friendly explainer on spherical harmonics promises prettier game lighting with just a handful of numbers—and the comments immediately turned it into a who’s-right showdown. One camp, led by vatsachak, zeroed in on the practical angle: is this basically smart compression? If third‑order needs only 16 numbers, that’s a tiny payload for big visuals. Efficiency stans cheered.

Then maho rolled in with the vibes: keep it real (numbers), keep it cartesian. Translation: explain the math in plain, real‑number form instead of spooky complex equations. Cue nerdy name‑drops like “solid harmonics,” plus subtle flexing over who learned it the “right” way. The “reader mode won’t work” disclaimer even got side‑eye—some joked the only thing getting compressed here is their attention span.

Plot twist: audio engineers crashed the party. hackingonempty reminded everyone that this math also powers Ambisonics—fancy 3D surround sound you can rotate around your head. The comment asked the chaos question: has any game actually used it? That lit the thread like a disco ball—half hyped about rotating soundfields, half calling it overkill for games. The overall mood? Math demystified, egos mildly singed, and a surprise soundtrack cameo.

Key Points

  • Spherical harmonics can represent any continuous function on the sphere as an infinite weighted sum; truncation yields useful approximations.
  • They are valuable in real-time graphics for efficiently approximating directional functions like lighting with a small number of coefficients.
  • Incoming radiance and irradiance can be treated as functions of direction; cubemaps tabulate such directional data.
  • Spherical harmonics can also approximate per-point thickness along directions, enabling effects like subsurface scattering when baked into a texture atlas.
  • The article aims for accessibility, expecting only baseline math/rendering knowledge and avoiding rigorous proofs while introducing definitions and function space concepts.

Hottest takes

"Ambisonic surround sound ... decoded for arbitrary speaker locations" — hackingonempty
"Is the appeal of spherical harmonics in graphics compression?" — vatsachak
"+1 for introducing them as real-valued functions over cartesian coordinates!" — maho
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.