getColorEstimate
Helper to estimate the color and relative intensity of the environment represented by spherical harmonics in a given direction.
This can be used to set the color and intensity of a directional light. In this case make sure to multiply the returned intensity by the intensity of this indirect light.
Return
A vector of 4 floats: first 3 components are the linear color, 4th is the intensity
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Direction X component (should form a unit vector with y and z)
Direction Y component (should form a unit vector with x and z)
Direction Z component (should form a unit vector with x and y)
Optional FloatArray for result; created if null
See also
Helper to estimate the color and relative intensity of the environment represented by spherical harmonics in a given direction.
This can be used to set the color and intensity of a directional light. In this case make sure to multiply the returned intensity by the intensity of this indirect light.
Return
A vector of 4 floats: first 3 components are the linear color, 4th is the intensity
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Direction X component (should form a unit vector with y and z)
Direction Y component (should form a unit vector with x and z)
Direction Z component (should form a unit vector with x and y)
Optional FloatArray for result; created if null
See also
Helper to estimate the color and relative intensity of the environment represented by spherical harmonics in a given direction.
This can be used to set the color and intensity of a directional light. In this case make sure to multiply the returned intensity by the intensity of this indirect light.
Return
A vector of 4 floats: first 3 components are the linear color, 4th is the intensity
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Direction X component (should form a unit vector with y and z)
Direction Y component (should form a unit vector with x and z)
Direction Z component (should form a unit vector with x and y)
Optional FloatArray for result; created if null
See also
Helper to estimate the color and relative intensity of the environment represented by spherical harmonics in a given direction.
This can be used to set the color and intensity of a directional light. In this case make sure to multiply the returned intensity by the intensity of this indirect light.
Return
A vector of 4 floats: first 3 components are the linear color, 4th is the intensity
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Direction X component (should form a unit vector with y and z)
Direction Y component (should form a unit vector with x and z)
Direction Z component (should form a unit vector with x and y)
Optional FloatArray for result; created if null
See also
Helper to estimate the color and relative intensity of the environment represented by spherical harmonics in a given direction.
This can be used to set the color and intensity of a directional light. In this case make sure to multiply the returned intensity by the intensity of this indirect light.
Return
A vector of 4 floats: first 3 components are the linear color, 4th is the intensity
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Direction X component (should form a unit vector with y and z)
Direction Y component (should form a unit vector with x and z)
Direction Z component (should form a unit vector with x and y)
Optional FloatArray for result; created if null