Gets the 6 cubemap textures in OpenGL texture format based on the inferred Environmental HDR
lighting.
Details
Returns
An array that contains 6 images in AIMAGE_FORMAT_RGBA_FP16 format for the HDR cubemap. The memory layout for the image
data is identical to GL_RGBA16F. The pixel values are in linear color space. The
order of the images corresponds to the cubemap order in the following fashion:
Returns RGB scaling factors to be applied to the final color computed in the fragment shader.
The last component contains the average pixel intensity. 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. If Config.LightEstimationMode.AMBIENT_INTENSITY mode is not set, returns all zeros.
The RGB scale factors can be used independently from the pixel intensity value. They are put
together for the convenience of only having to upload one float4 to the fragment shader.
The RGB scale factors are not intended to brighten nor dim the scene. They are only to shift
the color of the virtual object towards the color of the light; not intensity of the light. The
pixel intensity is used to match the intensity of the light in the scene.
Color correction values are reported in gamma color space. If rendering in gamma color
space, multiply them component-wise against the final calculated color after rendering. If
rendering in linear space, first convert the values to linear space by rising to the power 2.2.
Details
Parameters
outColorCorrection4
The float array the 4 component color correction values are written
to. The four values are:
outColorCorrection4[0]: Color correction value for the red channel. This
value is larger or equal to zero.
outColorCorrection4[1]: Color correction value for the green channel. This
value is always 1.0 as the green channel is the reference baseline.
outColorCorrection4[2]: Color correction value for the blue channel. This
value is larger or equal to zero.
outColorCorrection4[3]: This value is identical to the average pixel
intensity from getPixelIntensity() in the range [0.0, 1.0].
offset
The offset into the array the 4 color correction components are written.
public
float[]
getEnvironmentalHdrAmbientSphericalHarmonics
()
Gets the spherical harmonics coefficients for the ambient illumination based on the inferred
Environmental HDR lighting.
Details
Returns
The output spherical harmonics coefficients for the ambient illumination. This array
contains 9 sets of per-channel coefficients, or a total of 27 values of 32-bit floating
point type. The coefficients are stored in a channel-major fashion e.g. [r0, g0, b0,
r1, g1, b1, ... , r8, g8, b8]. If Config.LightEstimationMode.ENVIRONMENTAL_HDR
mode is not set, returns zero for all 27 coefficients.
public
float[]
getEnvironmentalHdrMainLightDirection
()
Returns the direction of the main directional light based on the inferred Environmental HDR
light estimation. If Config.LightEstimationMode.ENVIRONMENTAL_HDR mode is not set,
returns [0.0, 1.0, 0.0], representing a light shining straight down from above.
Details
Returns
The normalized output lighting direction of the main directional light as 3 floats
[x, y, z].
public
float[]
getEnvironmentalHdrMainLightIntensity
()
Returns the intensity of the main directional light based on the inferred Environmental HDR
lighting estimation. All return values are larger or equal to zero. If Config.LightEstimationMode.ENVIRONMENTAL_HDR mode is not set, returns zero for all elements of
the array.
Details
Returns
The output lighting intensity of the main directional light as 3 floats [r, g, b].
public
float
getPixelIntensity
()
getPixelIntensity
publicfloatgetPixelIntensity()
Returns the pixel intensity of the current camera view in gamma color space. Values are in the
range [0.0, 1.0], with zero being black and one being white. If Config.LightEstimationMode.AMBIENT_INTENSITY mode is not set, returns zero.
If rendering in gamma color space, divide this value by 0.466, which is middle gray in gamma
color space, and multiply against the final calculated color after rendering. If rendering in
linear space, first convert this value to linear space by rising to the power 2.2. Normalize
the result by dividing it by 0.18, which is middle gray in linear space. Then multiply by the
final calculated color after rendering.
Returns the validity of this lighting estimate. When the estimate is LightEstimate.State.NOT_VALID it
should not be used for rendering.
public
long
getTimestamp
()
getTimestamp
publiclonggetTimestamp()
Returns 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[],[],null,[]]