浏览代码

Bugfix: Check if intensity zero and and if so skip the distortion pass entirely (#72)

/main
GitHub 4 年前
当前提交
3d160315
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 12
      com.unity.perception/Runtime/GroundTruth/LensDistortionCrossPipelinePass.cs

12
com.unity.perception/Runtime/GroundTruth/LensDistortionCrossPipelinePass.cs


if(targetCamera == null)
return false;
if(targetCamera.GetUniversalAdditionalCameraData().renderPostProcessing == false && lensDistortionOverride.HasValue == false)
var UACD = targetCamera.GetUniversalAdditionalCameraData();
if(UACD.renderPostProcessing == false && lensDistortionOverride.HasValue == false)
if (m_lensDistortion.active == false)
return false;
#else
return false;
#endif

mult.x = Mathf.Max(m_lensDistortion.xMultiplier.value, 1e-4f);
mult.y = Mathf.Max(m_lensDistortion.yMultiplier.value, 1e-4f);
scale = 1.0f / m_lensDistortion.scale.value;
}
else
{
return false;
}
}

正在加载...
取消
保存