JAMESBOX / LAB 01
SHOWCASE / LIVE RGB SH ENCODER

Spherical harmonics

A room for the light.

Two movable world-space lights are encoded live into 27 RGB SH coefficients, then reconstructed across the gallery.

Soft environment 9 IRRADIANCE COEFFICIENTS
Directional functions DRAG SPHERES TO ROTATE
Y1,1(ω)
− negative0+ positive
One-bounce GINOT BAKED
Rendering pipelineLIGHT × COSINE × VISIBILITY
Lighting field
SH light encoderTABLE / SCENE ORIGIN
x −4.80 / y 4.20 / z 3.00
Encoded RGB coefficients
Light direction −40° / 55°
Scene surface valueSH approximation

DIFFUSE IRRADIANCE / COSINE-WEIGHTED HEMISPHERE

Reconstruction orderOrder 2 / 9 coefficients
c0,00.00 c1,−10.00 c1,00.00 c1,10.00 c2,−20.00 c2,−10.00 c2,00.00 c2,10.00 c2,20.00

This first-order basis changes sign across the x axis. Gray is exactly zero.

Yl,m(ω) is a fixed pattern on the sphere
08 / SOFT-LIGHT SHOWCASE