Nerites 7 年前
当前提交
d1950af0
共有 3 个文件被更改,包括 5 次插入17 次删除
  1. 9
      com.unity.render-pipelines.high-definition/HDRP/Camera/HDCamera.cs
  2. 6
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
  3. 7
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs

9
com.unity.render-pipelines.high-definition/HDRP/Camera/HDCamera.cs


using System.Collections.Generic;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.XR;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{

m_ActualHeight = camera.pixelHeight;
var screenWidth = m_ActualWidth;
var screenHeight = m_ActualHeight;
#if !UNITY_SWITCH
screenWidth = XRSettings.eyeTextureWidth;
screenHeight = XRSettings.eyeTextureHeight;
screenWidth = XRGraphicsConfig.eyeTextureWidth;
screenHeight = XRGraphicsConfig.eyeTextureHeight;
var xrDesc = XRSettings.eyeTextureDesc;
var xrDesc = XRGraphicsConfig.eyeTextureDesc;
#endif
// Unfortunately sometime (like in the HDCameraEditor) HDUtils.hdrpSettings can be null because of scripts that change the current pipeline...
m_msaaSamples = HDUtils.hdrpSettings != null ? HDUtils.hdrpSettings.msaaSampleCount : MSAASamples.None;

6
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs


using System.Linq;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.XR;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{

return false;
}
#if !UNITY_SWITCH
if (XRSettings.isDeviceActive)
if (XRGraphicsConfig.enabled)
#endif
return true;
}

7
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs


using System;
using System.Collections.Generic;
using UnityEngine.XR;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{

// Planar and real time cubemap doesn't need post process and render in FP16
aggregate.enablePostprocess = camera.cameraType != CameraType.Reflection && srcFrameSettings.enablePostprocess;
#if UNITY_SWITCH
aggregate.enableStereo = false;
#else
aggregate.enableStereo = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableStereo && XRSettings.isDeviceActive && (camera.stereoTargetEye == StereoTargetEyeMask.Both) && renderPipelineSettings.supportStereo;
#endif
aggregate.enableStereo = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableStereo && XRGraphicsConfig.enabled && (camera.stereoTargetEye == StereoTargetEyeMask.Both);
aggregate.enableAsyncCompute = srcFrameSettings.enableAsyncCompute && SystemInfo.supportsAsyncCompute;

正在加载...
取消
保存