浏览代码

Naive hookup for cameraData.renderScale <->

XRSettings.eyeTextureResolutionScale in XR mode
/main
Nerites 7 年前
当前提交
dcbdc53b
共有 1 个文件被更改,包括 18 次插入3 次删除
  1. 21
      com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs

21
com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs


// Discard variations lesser than kRenderScaleThreshold.
// Scale is only enabled for gameview
// XR has it's own scaling mechanism.
cameraData.renderScale = (Mathf.Abs(1.0f - pipelineAsset.renderScale) < kRenderScaleThreshold) ? 1.0f : pipelineAsset.renderScale;
cameraData.renderScale = (camera.cameraType == CameraType.Game && !cameraData.isStereoEnabled) ? cameraData.renderScale : 1.0f;
// XR has its own scaling mechanism.
if (camera.cameraType == CameraType.Game)
{
if (cameraData.isStereoEnabled)
{
cameraData.renderScale = XRSettings.eyeTextureResolutionScale;
}
else
{
cameraData.renderScale = pipelineAsset.renderScale;
}
} else
{
cameraData.renderScale = 1.0f;
}
cameraData.renderScale = (Mathf.Abs(1.0f - cameraData.renderScale) < kRenderScaleThreshold) ? 1.0f : cameraData.renderScale;
cameraData.requiresDepthTexture = pipelineAsset.supportsCameraDepthTexture || cameraData.postProcessEnabled || cameraData.isSceneViewCamera;
cameraData.requiresSoftParticles = pipelineAsset.supportsSoftParticles;

正在加载...
取消
保存