From 55a6e48090a2bddeeade2a0b3684c0d26a50695c Mon Sep 17 00:00:00 2001 From: Robin De Moor Date: Mon, 18 Oct 2021 16:05:03 +0200 Subject: [PATCH 1/2] fix case 1360233, correct rt setup for filter view --- .../Runtime/UniversalRenderer.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs b/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs index e55c91b7d64..3ddc3cae84d 100644 --- a/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs +++ b/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs @@ -523,9 +523,11 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re if (cameraData.renderType == CameraRenderType.Base) { RenderTargetHandle cameraTargetHandle = RenderTargetHandle.GetCameraTarget(cameraData.xr); + bool sceneViewFilterEnabled = camera.sceneViewFilterMode == Camera.SceneViewFilterMode.ShowFiltered; - m_ActiveCameraColorAttachment = (createColorTexture) ? m_ColorBufferSystem.GetBackBuffer() : cameraTargetHandle; - m_ActiveCameraDepthAttachment = (createDepthTexture) ? m_CameraDepthAttachment : cameraTargetHandle; + //Scene filtering redraws the objects on top of the resulting frame. It has to draw directly to the sceneview buffer. + m_ActiveCameraColorAttachment = (createColorTexture && !sceneViewFilterEnabled) ? m_ColorBufferSystem.GetBackBuffer() : cameraTargetHandle; + m_ActiveCameraDepthAttachment = (createDepthTexture && !sceneViewFilterEnabled) ? m_CameraDepthAttachment : cameraTargetHandle; bool intermediateRenderTexture = createColorTexture || createDepthTexture; From 8ff55c710dd73bff37a29eca91d7786e92dec896 Mon Sep 17 00:00:00 2001 From: Robin De Moor Date: Mon, 18 Oct 2021 16:18:36 +0200 Subject: [PATCH 2/2] add changelog --- com.unity.render-pipelines.universal/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index c117c127910..78e1997d650 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix for rendering thumbnails. [case 1348209](https://issuetracker.unity3d.com/issues/preview-of-assets-do-not-show-in-the-project-window) - Fixed a regression bug where XR camera postion can not be modified in beginCameraRendering [case 1365000] - Fixed an issue in where installing the Adaptive Performance package caused errors to the inspector UI [1368161](https://issuetracker.unity3d.com/issues/urp-package-throws-compilation-error-cs1525-when-imported-together-with-adaptive-performance-package) - +- Fixed a regression where filtering the scene view yielded incorrect visual results [1360233](https://issuetracker.unity3d.com/product/unity/issues/guid/1360233) ## [13.1.0] - 2021-09-24 ### Added