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; confine an instance to a single thread, exactly as in three.js.
The isSphericalHarmonics3 duck-typing flag is intentionally dropped. Use is SphericalHarmonics3 instead.
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.
Returns an array with the SH coefficients, or copies them into the provided array. The coefficients are represented as numbers.
Sets all SH coefficients to 0.