Linear basis for lighting
l
Z
l
Y
l
X
Surface normal = (X,Y,Z)
albedo =
l
Directional source = (Lx,Ly,Lz)
I =
l
(Lx,Ly,Lz)(X,Y,Z) = Lx*
l
X + Ly*
l
Y + Lz*
l
Z
Take Max of this and 0