|
|
|
|
|
|
if (args.lightEstimation.mainLightColor.HasValue) |
|
|
|
{ |
|
|
|
mainLightColor = args.lightEstimation.mainLightColor; |
|
|
|
|
|
|
|
#if PLATFORM_ANDROID
|
|
|
|
// ARCore needs to apply energy conservation term (1 / PI) and be placed in gamma
|
|
|
|
m_Light.color = mainLightColor.Value / Mathf.PI; |
|
|
|
m_Light.color = m_Light.color.gamma; |
|
|
|
|
|
|
|
// ARCore returns color in HDR format (can be represented as FP16 and have values above 1.0)
|
|
|
|
var camera = m_CameraManager.GetComponentInParent<Camera>(); |
|
|
|
if (camera == null || !camera.allowHDR) |
|
|
|
{ |
|
|
|
Debug.LogWarning($"HDR Rendering is not allowed. Color values returned could be above the maximum representable value."); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
m_Light.color = mainLightColor.Value; |
|
|
|
} |
|
|
|
|
|
|
|
if (args.lightEstimation.mainLightIntensityLumens.HasValue) |
|
|
|