Skip to main content

SphericalHarmonicsL2

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

Members

Properties

NameDescription
SphericalHarmonicsL2.[[rgb, coefficient]](./[rgb, coefficient].md)Access individual SH coefficients.

Constructor

NameDescription
SphericalHarmonicsL2()Create new SphericalHarmonicsL2.

Methods

NameDescription
SphericalHarmonicsL2.AddAmbientLight(color)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)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()Clears SH probe to zero.
SphericalHarmonicsL2.Evaluate(directions[])Evaluates the Spherical Harmonics for each of the given directions. Directions must be normalized.