new SphericalHarmonicsRGB()
Methods
-
evaluate(vector [, target])
-
Evaluates the SH representation and returns the value at the given direction.
Parameters:
Name Type Argument Description vector
The direction vector for which we're evaluating the function. This is expected to be normalized.
target
Color <optional>
An optional target to store the evaluated value
-
setWeight(level, index, value)
-
Assigns the weight for a given SH basis function
Parameters:
Name Type Description level
The SH level from 0 to 2
index
The index of the base function for the current level. For level 0, this must be 0. Otherwise it's in the range [-level, level]
value
A Float4 object containing the three weights in xyz.