SphericalHarmonics3
Represents a third-order spherical harmonics (SH). Light probes use this class to encode lighting information.
Primary reference: https://graphics.stanford.edu/papers/envmap/envmap.pdf
Secondary reference: https://www.ppsloan.org/publications/StupidSH36.pdf
Instances are mutable and not thread-safe. Use each instance from one thread only.
There is no isSphericalHarmonics3 flag. Use is SphericalHarmonics3 instead.
Properties
The nine spherical harmonics coefficients, one Vector3 each. Change them in place.
Functions
Adds the given SH to this instance.
Returns a new spherical harmonics with copied values from this instance.
Copies the values of the given spherical harmonics to this instance.
Structural equality: true when other is a SphericalHarmonics3 whose nine coefficients are all equal (via Vector3.equals, so NaN != NaN).
Sets the SH coefficients of this instance from the given array.
Returns the irradiance (radiance convolved with cosine lobe) in the direction of the given normal.
Linear interpolates between the given SH and this instance by the given alpha factor.
Scales this SH by the given scale factor.
Sets the given SH coefficients to this instance by copying the values.
Sets all SH coefficients to 0.