From 97062ecdd31870a73fe6684f89ae43f13f516b59 Mon Sep 17 00:00:00 2001 From: Angela Dematte Date: Fri, 12 Sep 2025 14:28:05 +0000 Subject: [PATCH 1/3] [UUM-113462] Disable unstable 003-VirtualTexturing tests --- .../Tests/TestFilters/TestCaseFilters.asset | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset b/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset index 2a5a6b786b6..a54382f3a0f 100644 --- a/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset +++ b/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset @@ -103,3 +103,23 @@ MonoBehaviour: XrSdk: StereoModes: 0 Reason: 'Unstable on PS4: https://jira.unity3d.com/browse/UUM-113462 ' + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 32f9dd5fabc57284bb43468761c84f36, type: 3} + ColorSpace: 1 + BuildPlatform: 31 + GraphicsDevice: 4 + Architecture: 0 + XrSdk: + StereoModes: 0 + Reason: 'Unstable on PS4: https://jira.unity3d.com/browse/UUM-113462 ' + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 500813a390ad4074cba926bf26eef57a, type: 3} + ColorSpace: 1 + BuildPlatform: 31 + GraphicsDevice: 4 + Architecture: 0 + XrSdk: + StereoModes: 0 + Reason: 'Unstable on PS4: https://jira.unity3d.com/browse/UUM-113462 ' From 5d1da2cc1472b7d6f05b402552a3bb2558d6bfd6 Mon Sep 17 00:00:00 2001 From: Kenny Tan Date: Tue, 23 Sep 2025 07:45:39 +0000 Subject: [PATCH 2/3] [Port] [2021.3] [UUM-116587][6000.4][URP 2D] Fix Light 2D name on game object creation --- .../Editor/2D/Renderer2DMenus.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs index f15f6c1f660..f7afb82e500 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs @@ -76,7 +76,8 @@ internal static void Place(GameObject go, GameObject parent) static Light2D CreateLight(MenuCommand menuCommand, Light2D.LightType type, Vector3[] shapePath = null) { - GameObject go = ObjectFactory.CreateGameObject("Light 2D", typeof(Light2D)); + var lightName = type != Light2D.LightType.Point ? type.ToString() : "Spot"; + GameObject go = ObjectFactory.CreateGameObject(lightName + " Light 2D", typeof(Light2D)); Light2D light2D = go.GetComponent(); light2D.lightType = type; From f02f9b2a43d64fa969aed31e7e5a948db225c76e Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Wed, 24 Sep 2025 01:29:46 +0000 Subject: [PATCH 3/3] [Port] [2021.3] Fix DRS + CustomPass AfterPostprocess and camera depth --- .../CustomPass/CustomPassDrawer.cs | 17 +++++++++++ .../RenderPass/CustomPass/CustomPass.cs | 29 +++++++++++++++---- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs index eb22b48ccc0..f06ea077a6e 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs @@ -167,6 +167,16 @@ void DoCommonSettingsGUI(ref Rect rect) { EditorGUI.PropertyField(rect, m_TargetDepthBuffer, Styles.targetDepthBuffer); rect.y += Styles.defaultLineSpace; + + CustomPass.TargetBuffer requestedDepth = m_TargetDepthBuffer.GetEnumValue(); + if (m_CustomPass.getConstrainedDepthBuffer() != requestedDepth) + { + Rect helpBoxRect = rect; + float helpBoxHeight = EditorGUIUtility.singleLineHeight * 2; + helpBoxRect.height = helpBoxHeight; + EditorGUI.HelpBox(helpBoxRect, "Camera depth isn't supported when dynamic scaling is on. We will automatically fall back to not doing depth-testing for this pass.", MessageType.Warning); + rect.y += helpBoxHeight; + } } if ((commonPassUIFlags & PassUIFlag.ClearFlags) != 0) @@ -259,6 +269,13 @@ internal float GetPropertyHeight(SerializedProperty property, GUIContent label) } height += Styles.defaultLineSpace * lines; + + // Add height for the help box if it will be shown + if ((commonPassUIFlags & PassUIFlag.TargetDepthBuffer) != 0 && + m_CustomPass.getConstrainedDepthBuffer() != m_TargetDepthBuffer.GetEnumValue()) + { + height += EditorGUIUtility.singleLineHeight * 2; // Help box height + } } return height + GetPassHeight(property); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs index 907fda1a823..d3170956e93 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs @@ -52,6 +52,24 @@ internal ProfilingSampler profilingSampler /// public TargetBuffer targetDepthBuffer; + // The actual depth buffer has to follow some constraints, and thus may not be the same result as the target + // depth buffer that the user has requested. Apply these constraints and return a result. + internal TargetBuffer getConstrainedDepthBuffer() + { + TargetBuffer depth = targetDepthBuffer; + if (depth == TargetBuffer.Camera && + HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings.enabled && + currentHDCamera.allowDynamicResolution && + injectionPoint == CustomPassInjectionPoint.AfterPostProcess) + { + // This custom pass is injected after postprocessing, and Dynamic Resolution Scaling is enabled, which + // means an upscaler is active. In this case, the camera color buffer is the full display resolution, + // but the camera depth buffer is a lower, pre-upscale resolution. So we cannot do depth testing here. + depth = TargetBuffer.None; + } + return depth; + } + /// /// What clear to apply when the color and depth buffer are bound /// @@ -270,7 +288,7 @@ internal void ExecuteInternal(RenderGraph renderGraph, HDCamera hdCamera, Cullin customPass.isExecuting = false; // Set back the camera color buffer if we were using a custom buffer as target - if (customPass.targetDepthBuffer != TargetBuffer.Camera) + if (customPass.getConstrainedDepthBuffer() != TargetBuffer.Camera) CoreUtils.SetRenderTarget(ctx.cmd, outputColorBuffer); }); } @@ -307,16 +325,17 @@ bool IsMSAAEnabled(HDCamera hdCamera) // This function must be only called from the ExecuteInternal method (requires current render target and current RT manager) void SetCustomPassTarget(CommandBuffer cmd) { + TargetBuffer depth = getConstrainedDepthBuffer(); // In case all the buffer are set to none, we can't bind anything - if (targetColorBuffer == TargetBuffer.None && targetDepthBuffer == TargetBuffer.None) + if (targetColorBuffer == TargetBuffer.None && depth == TargetBuffer.None) return; RTHandle colorBuffer = (targetColorBuffer == TargetBuffer.Custom) ? currentRenderTarget.customColorBuffer.Value : currentRenderTarget.colorBufferRG; - RTHandle depthBuffer = (targetDepthBuffer == TargetBuffer.Custom) ? currentRenderTarget.customDepthBuffer.Value : currentRenderTarget.depthBufferRG; + RTHandle depthBuffer = (depth == TargetBuffer.Custom) ? currentRenderTarget.customDepthBuffer.Value : currentRenderTarget.depthBufferRG; - if (targetColorBuffer == TargetBuffer.None && targetDepthBuffer != TargetBuffer.None) + if (targetColorBuffer == TargetBuffer.None && depth != TargetBuffer.None) CoreUtils.SetRenderTarget(cmd, depthBuffer, clearFlags); - else if (targetColorBuffer != TargetBuffer.None && targetDepthBuffer == TargetBuffer.None) + else if (targetColorBuffer != TargetBuffer.None && depth == TargetBuffer.None) CoreUtils.SetRenderTarget(cmd, colorBuffer, clearFlags); else {