From b1fbb4a31ab6216202f094320a892ccab1e64115 Mon Sep 17 00:00:00 2001 From: Nicola Cerone Date: Thu, 22 Jan 2026 16:55:09 +0000 Subject: [PATCH 01/23] [Backport 6000.4] Show warning when VisualElement material is not compatible. --- .../Editor/Generation/Targets/UITK/UISubTarget.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs b/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs index 5b589dc8d63..321ad95f8be 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs @@ -110,6 +110,7 @@ public virtual SubShaderDescriptor GenerateDefaultSubshader(bool isSRP = true ) shaderFallback = "", CanUseSpriteAtlas = "True", generatesPreview = true, + customTags = "\"isCustomUITKShader\"=\"true\"", passes = new PassCollection(), }; From 0224b250d45219f06d709aeb19963c3ab6d8161b Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 22 Jan 2026 22:57:56 +0000 Subject: [PATCH 02/23] [Port] [6000.4] Fix for shaders to be compliant with HLSL 2021 --- .../Runtime/Lighting/SurfaceCache/PatchUtil.hlsl | 4 ++-- .../Runtime/Lighting/SurfaceCache/VectorLogic.hlsl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl index 46cc797e118..496b10b9633 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl @@ -99,7 +99,7 @@ namespace PatchUtil float2 SphereToSquare(float3 n) { n /= (abs(n.x) + abs(n.y) + abs(n.z)); - n.xy = n.z >= 0.0 ? n.xy : OctWrap(n.xy); + n.xy = VECTOR_LOGIC_SELECT(n.z >= 0.0, n.xy, OctWrap(n.xy)); n.xy = n.xy * 0.5 + 0.5; return n.xy; } @@ -151,7 +151,7 @@ namespace PatchUtil uint3 SignedIntegerModulo(int3 x, uint modulus) { const uint3 remainder = uint3(abs(x)) % modulus; - return VECTOR_LOGIC_SELECT(x < 0 && remainder != 0, modulus - remainder, remainder); + return VECTOR_LOGIC_SELECT(VECTOR_LOGIC_AND(x < 0, remainder != 0), modulus - remainder, remainder); } uint3 ConvertGridSpaceToStorageSpace(uint3 posGridSpace, uint gridSize, int3 cascadeOffset) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl index 9c95cd462d3..4186a810511 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl @@ -1,7 +1,7 @@ #ifndef VECTOR_LOGIC #define VECTOR_LOGIC -#if defined(XBOX) +#if defined(SHADER_API_GAMECORE) #define USE_HLSL2021_VECTOR_LOGIC_INTRINSICS #endif @@ -9,7 +9,7 @@ #define VECTOR_LOGIC_AND(x, y) and(x, y) #define VECTOR_LOGIC_OR(x, y) or(x, y) -#define VECTOR_LOGIC_SELECT(condition, trueValue, falseValue) select(condition, trueValue, falseValue) +#define VECTOR_LOGIC_SELECT(condition, trueValue, falseValue) select((condition), (trueValue), (falseValue)) #else From f16b2acd857fbda53cb1c92ee397c5121355ac38 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 22 Jan 2026 22:57:56 +0000 Subject: [PATCH 03/23] [Port] [6000.4] docg-8262: Fix typo --- .../Documentation~/Shader-Graph-Sample-UGUI-Shaders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md index da576e96f05..e77ef30e74f 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md @@ -24,7 +24,7 @@ We have two main objectives with this sample set: Documentation for this set of samples is broken into the following pages: * [Getting started](Shader-Graph-Sample-UGUI-Shaders-Getting-Started.md) -* [Custom UI componenents](Shader-Graph-Sample-UGUI-Shaders-Custom-UI-components.md) +* [Custom UI components](Shader-Graph-Sample-UGUI-Shaders-Custom-UI-components.md) * [Custom nodes](Shader-Graph-Sample-UGUI-Shaders-Custom-nodes.md) * [Subgraph nodes](Shader-Graph-Sample-UGUI-Shaders-Subgraph-nodes.md) * [Examples](Shader-Graph-Sample-UGUI-Shaders-Examples.md) From bc45f86713ef30b0e6a9f46667b44268f29ec77d Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Sat, 24 Jan 2026 20:46:36 +0000 Subject: [PATCH 04/23] [Port] [6000.4] Create a dummy color for binding when MSAA samples mismatch in depth copy pass --- .../Runtime/Passes/CopyDepthPass.cs | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs index 6d4bade9a37..ed72754eae2 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs @@ -220,8 +220,34 @@ public void Render(RenderGraph renderGraph, TextureHandle destination, TextureHa // binding a dummy color target as a workaround to an OSX issue in Editor scene view (UUM-47698). // Also required for preview camera rendering for grid drawn with builtin RP (UUM-55171). // Also required for render gizmos (UUM-91335). + // When MSAA is enabled with Dbuffer can cause sample count mismatches between active color and depth target; create a dummy color target to resolve. (UUM-131330) if (cameraData.isSceneViewCamera || cameraData.isPreviewCamera || UnityEditor.Handles.ShouldRenderGizmos()) - builder.SetRenderAttachment(resourceData.activeColorTexture, 0); + { + // get info for the active color + var activeColorInfo = renderGraph.GetRenderTargetInfo(resourceData.activeColorTexture); + + // destination depth info (the texture we created earlier) + var destInfo = renderGraph.GetRenderTargetInfo(destination); + + // if samples mismatch, create a dummy color RT with dest's samples + if (activeColorInfo.msaaSamples != destInfo.msaaSamples) + { + TextureHandle dummyColor = renderGraph.CreateTexture(new TextureDesc(activeColorInfo.width, activeColorInfo.height, false, true) + { + name = "Copy Depth Editor Dummy Color", + slices = activeColorInfo.volumeDepth, + format = activeColorInfo.format, + msaaSamples = (MSAASamples)destInfo.msaaSamples, // match the depth target + clearBuffer = false, + bindTextureMS = activeColorInfo.bindMS + }); + builder.SetRenderAttachment(dummyColor, 0); + } + else + { + builder.SetRenderAttachment(resourceData.activeColorTexture, 0); + } + } #endif } else if (CopyToDepthXR) From 7566fd4cb6711a91e0e4127509d41cb554da9f8e Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Sat, 24 Jan 2026 20:46:36 +0000 Subject: [PATCH 05/23] [Port] [6000.4] Partially revert a PR #81816 and register debug data when in build process --- .../Runtime/Debugging/DebugDisplaySettingsUI.cs | 4 ---- .../Runtime/Debug/DebugDisplay.cs | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs index 726a3c34701..bb29b4cf382 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs @@ -32,10 +32,6 @@ private void Reset() /// to be registered public void RegisterDebug(IDebugDisplaySettings settings) { -#if UNITY_EDITOR - if (UnityEditor.BuildPipeline.isBuildingPlayer) - return; -#endif DebugManager debugManager = DebugManager.instance; List panels = new List(); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 7ded743ff74..b891cd00db2 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -2125,11 +2125,6 @@ void UnregisterRenderingDebug() internal void RegisterDebug() { -#if UNITY_EDITOR - if (UnityEditor.BuildPipeline.isBuildingPlayer) - return; -#endif - RegisterMaterialDebug(); RegisterLightingDebug(); RegisterRenderingDebug(); @@ -2149,7 +2144,7 @@ void UnregisterDebugItems(string panelName, DebugUI.Widget[] items) { if (items == null || items.Length == 0) return; - + var panel = DebugManager.instance.GetPanel(panelName); if (panel != null) panel.children.Remove(items); From 3b1c10eb74691198caaa9f2823b86e7d43a53373 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Sun, 25 Jan 2026 00:29:47 +0000 Subject: [PATCH 06/23] [Port] [6000.4] Fix SampleDependencyImporter errors when opening/closing the window rapidly --- .../SampleDependencyImporter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs b/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs index d2a8bef4d18..c0af592b1ee 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs @@ -48,7 +48,7 @@ VisualElement panelRoot { get { - _panelRoot ??= injectingElement.panel.visualTree; + _panelRoot ??= injectingElement?.panel?.visualTree; return _panelRoot; } } @@ -82,11 +82,11 @@ VisualElement IPackageManagerExtension.CreateExtensionUI() void RefreshSampleButtons() { - if (injectingElement == null || m_PackageInfo == null || m_SampleList == null) + if (injectingElement == null || m_PackageInfo == null || m_SampleList == null || panelRoot == null) return; // Call refresh of samples and button injection when switching to the "Samples" tab. - if (samplesButton == null ) + if (samplesButton == null) { samplesButton = panelRoot.Q