浏览代码

Draft 1.0 of XRSettings.eyeTextureResolutionScale hookup

/main
Nerites 7 年前
当前提交
59b89be9
共有 2 个文件被更改,包括 9 次插入5 次删除
  1. 11
      com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs
  2. 3
      com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs

11
com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs


{
Camera camera = cameraData.camera;
RenderTextureDescriptor desc;
float renderScale = cameraData.renderScale;
desc = XRSettings.eyeTextureDesc;
{
XRSettings.eyeTextureResolutionScale = renderScale;
return XRSettings.eyeTextureDesc; // FIXME Any adjustments needed before using eyeTextureDesc?
}
{
float renderScale = cameraData.renderScale;
}
desc.colorFormat = cameraData.isHdrEnabled ? RenderTextureFormat.DefaultHDR :
RenderTextureFormat.Default;
desc.enableRandomWrite = false;

3
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 = (camera.cameraType == CameraType.Game && !cameraData.isStereoEnabled) ? cameraData.renderScale : 1.0f;
cameraData.renderScale = (camera.cameraType == CameraType.Game) ? cameraData.renderScale : 1.0f;
cameraData.requiresDepthTexture = pipelineAsset.supportsCameraDepthTexture || cameraData.postProcessEnabled || cameraData.isSceneViewCamera;
cameraData.requiresSoftParticles = pipelineAsset.supportsSoftParticles;

正在加载...
取消
保存