From 4117a0c9e69adf387b05ce290c0b5cc06d3816ac Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 6 Jun 2024 12:49:10 +0000 Subject: [PATCH] [Port] [2021.3] [2022.3 Backport] Bug Fix - [UUM-57147] - Disabling NRP for Editor FinalCopyDepth pass Backport of #48821 Fixed UUM-57147 --- .../Runtime/UniversalRenderer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs index 6dab0c38b27..1e6ea195e0f 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs @@ -940,6 +940,10 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re // Scene view camera should always resolve target (not stacked) m_FinalDepthCopyPass.Setup(m_DepthTexture, RenderTargetHandle.CameraTarget); m_FinalDepthCopyPass.MssaSamples = 0; + // Turning off unnecessary NRP in Editor because of MSAA mistmatch between CameraTargetDescriptor vs camera backbuffer + // NRP layer considers this being a pass with MSAA samples by checking CameraTargetDescriptor taken from RP asset + // while the camera backbuffer has a single sample + m_FinalDepthCopyPass.useNativeRenderPass = false; EnqueuePass(m_FinalDepthCopyPass); } #endif