Table of Contents

Irradiance

Irradiance is diffuse reflection and is in Lys calculated as Lambertian diffuse reflection.

This target can either be exported as an image or alternatively as 9 spherical harmonic coefficients. This provides a very efficient form of compression which works well with irradiance due to how blurred the appearance of irradiance is.

Irradiance As A Spherical Harmonics Expansion

Lys allows you to export the irradiance as a nine coefficient spherical harmonic expansion per channel.

These may be exported either as text or as a 9×1 floating point texture. The initial pixel represents the first band. The next three pixels represent the second band and the last five pixels represent the third band of the expansion. The orientation of the spherical harmonic expansion is identical to that of the destination cube map and the color space is always linear. An example of how to sample the function is shown below.

Irradiance vs Spherical Harmonics

Above we have set out renders1) featuring results of irradiance vs spherical harmonics. The results using irradiance are on the left whereas the right shows the results obtained from spherical harmonics.