Skip to content

API > SphericalHarmonicsL2


SphericalHarmonicsL2⚓︎

Spherical harmonics up to the second order (3 bands, 9 coefficients). Based On

Members⚓︎

Properties⚓︎

Name Description
SphericalHarmonicsL2.[rgb, coefficient]Property Access individual SH coefficients.

Constructor⚓︎

Name Description
SphericalHarmonicsL2()Constructor Create new SphericalHarmonicsL2.

Methods⚓︎

Name Description
SphericalHarmonicsL2.AddAmbientLight(color) Method Add ambient lighting to probe data. If SH probe is used to calculate lighting, this function has the effect of adding ambient light into probe data.
SphericalHarmonicsL2.AddDirectionalLight(direction, color, intensity) Method Add directional light to probe data. If SH probe is used to calculate lighting, this function has the effect of adding directional light into probe data.
SphericalHarmonicsL2.Clear() Method Clears SH probe to zero.
SphericalHarmonicsL2.Evaluate(directions[]) Method Evaluates the Spherical Harmonics for each of the given directions. Directions must be normalized.