GoogleARCore. LightEstimate
An estimate of lighting conditions in the environment corresponding to an AR frame.
Summary
Constructors and Destructors |
|
---|---|
LightEstimate(LightEstimateState state, float pixelIntensity, Color colorCorrection) Deprecated. Please use constructor LightEstimate(LightEstimateState, float, Color, Quaternion, Color, float[,], long) instead. Constructor for a LightEstimate. |
|
LightEstimate(LightEstimateState state, float pixelIntensity, Color colorCorrection, Quaternion directionalLightRotation, Color directionalLightColor, float ambientSHCoefficients[,], long timestamp)
Constructor for a LightEstimate.
|
Properties |
|
---|---|
AmbientProbe
|
SphericalHarmonicsL2
Gets ambient spherical harmonics estimated by ARCore.
|
ColorCorrection
|
Color
Gets the color correction RGB scaling factors to be applied to the final color computed by the fragment shader to match the ambient color.
|
DirectionalLightColor
|
Color
Gets the estimated color of the main directional light in the world.
|
DirectionalLightRotation
|
Quaternion
Gets the quaternion rotation of the main directional light estimated by ARCore.
|
Mode
|
Gets the light estimation mode for the current session.
|
PixelIntensity
|
float
Gets an average pixel intensity.
|
ReflectionProbe
|
Cubemap
Gets the reflection cubemap from the light estimation.
|
State
|
Gets the state of the current estimate.
|
Timestamp
|
long
Gets the timestamp of the LightEstimate in nanoseconds.
|
Properties
AmbientProbe
SphericalHarmonicsL2 GoogleARCore::LightEstimate::AmbientProbe
Gets ambient spherical harmonics estimated by ARCore.
It will return a spherical harmonic probe with all 27 coefficients set to zero when the LightEstimateState is invalid or LightEstimationMode is not one of the Environmental HDR modes.
ColorCorrection
Color GoogleARCore::LightEstimate::ColorCorrection
Gets the color correction RGB scaling factors to be applied to the final color computed by the fragment shader to match the ambient color.
The color correction method uses the green channel as reference baseline and scales the red and blue channels accordingly. In this way the overall intensity will not be significantly changed.
DirectionalLightColor
Color GoogleARCore::LightEstimate::DirectionalLightColor
Gets the estimated color of the main directional light in the world.
It will return black when the LightEstimateState is invalid or LightEstimationMode is not one of the Environmental HDR modes.
DirectionalLightRotation
Quaternion GoogleARCore::LightEstimate::DirectionalLightRotation
Gets the quaternion rotation of the main directional light estimated by ARCore.
It will return Quaternion.identity when the LightEstimateState is invalid or LightEstimationMode is not one of the Environmental HDR modes.
Mode
LightEstimationMode GoogleARCore::LightEstimate::Mode
Gets the light estimation mode for the current session.
The light estimation mode.
PixelIntensity
float GoogleARCore::LightEstimate::PixelIntensity
Gets an average pixel intensity.
Values range from 0.0 to 1.0, where 0.0 represents black and 1.0 represents white.
ReflectionProbe
Cubemap GoogleARCore::LightEstimate::ReflectionProbe
Gets the reflection cubemap from the light estimation.
For performance reasons, the cubemap will only be created when this function is called on the LightEstimate object. It will return null when the LightEstimateState is invalid or LightEstimationMode is not EnvironmentalHDRWithReflections.
Timestamp
long GoogleARCore::LightEstimate::Timestamp
Gets the timestamp of the LightEstimate in nanoseconds.
ARCore returns a different timestamp when the underlying light estimate has changed. Conversely, the same timestamp is returned if the light estimate has not changed.
This timestamp uses the same time base as frame timestamp.
This timestamp is used to improve performance of the EnvironmentalHDRWithReflection light estimation mode, by ensuring that the Unity environmental reflections are only updated when ReflectionCubemap has changed.
The timestamp of the LightEstimate.
Public functions
LightEstimate
GoogleARCore::LightEstimate::LightEstimate( LightEstimateState state, float pixelIntensity, Color colorCorrection )
Constructor for a LightEstimate.
Deprecated. Please use constructor LightEstimate(LightEstimateState, float, Color, Quaternion, Color, float[,], long) instead.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
LightEstimate
GoogleARCore::LightEstimate::LightEstimate( LightEstimateState state, float pixelIntensity, Color colorCorrection, Quaternion directionalLightRotation, Color directionalLightColor, float ambientSHCoefficients[,], long timestamp )
Constructor for a LightEstimate.
Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|