new SphericalHarmonicsRGB()
Methods
-
evaluate(vector [, target])
-
Evaluates the SH representation and returns the value at the given direction.
Parameters:
Name Type Argument Description vectorThe direction vector for which we're evaluating the function. This is expected to be normalized.
targetColor <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 levelThe SH level from 0 to 2
indexThe index of the base function for the current level. For level 0, this must be 0. Otherwise it's in the range [-level, level]
valueA Float4 object containing the three weights in xyz.