浏览代码

Merge pull request #42 from unity/3.1-remove-android-specific-code

Remove unnecessary Android specific light estimation code
/3.1
GitHub Enterprise 5 年前
当前提交
c9c5270b
共有 1 个文件被更改,包括 1 次插入13 次删除
  1. 14
      Assets/Scripts/LightEstimation.cs

14
Assets/Scripts/LightEstimation.cs


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)

正在加载...
取消
保存