getDirectionEstimate
Helper to estimate the direction of the dominant light in the environment represented by spherical harmonics.
This assumes that there is only a single dominant light (such as the sun in outdoors environments), if it's not the case the direction returned will be an average of the various lights based on their intensity.
If there are no clear dominant light, as is often the case with low dynamic range (LDR) environments, this method may return a wrong or unexpected direction.
The dominant light direction can be used to set a directional light's direction, for instance to produce shadows that match the environment.
Return
A unit vector representing the direction of the dominant light
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Optional FloatArray for result; created if null
See also
Helper to estimate the direction of the dominant light in the environment represented by spherical harmonics.
This assumes that there is only a single dominant light (such as the sun in outdoors environments), if it's not the case the direction returned will be an average of the various lights based on their intensity.
If there are no clear dominant light, as is often the case with low dynamic range (LDR) environments, this method may return a wrong or unexpected direction.
The dominant light direction can be used to set a directional light's direction, for instance to produce shadows that match the environment.
Return
A unit vector representing the direction of the dominant light
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Optional FloatArray for result; created if null
See also
Helper to estimate the direction of the dominant light in the environment represented by spherical harmonics.
This assumes that there is only a single dominant light (such as the sun in outdoors environments), if it's not the case the direction returned will be an average of the various lights based on their intensity.
If there are no clear dominant light, as is often the case with low dynamic range (LDR) environments, this method may return a wrong or unexpected direction.
The dominant light direction can be used to set a directional light's direction, for instance to produce shadows that match the environment.
Return
A unit vector representing the direction of the dominant light
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Optional FloatArray for result; created if null
See also
Helper to estimate the direction of the dominant light in the environment represented by spherical harmonics.
This assumes that there is only a single dominant light (such as the sun in outdoors environments), if it's not the case the direction returned will be an average of the various lights based on their intensity.
If there are no clear dominant light, as is often the case with low dynamic range (LDR) environments, this method may return a wrong or unexpected direction.
The dominant light direction can be used to set a directional light's direction, for instance to produce shadows that match the environment.
Return
A unit vector representing the direction of the dominant light
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Optional FloatArray for result; created if null
See also
Helper to estimate the direction of the dominant light in the environment represented by spherical harmonics.
This assumes that there is only a single dominant light (such as the sun in outdoors environments), if it's not the case the direction returned will be an average of the various lights based on their intensity.
If there are no clear dominant light, as is often the case with low dynamic range (LDR) environments, this method may return a wrong or unexpected direction.
The dominant light direction can be used to set a directional light's direction, for instance to produce shadows that match the environment.
Return
A unit vector representing the direction of the dominant light
Parameters
3-band spherical harmonics coefficients (must be 9 float3 values, or 27 floats if flattened)
Optional FloatArray for result; created if null