From 055d714042a78905613b4c8c07f60d6cd6335777 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 8 Jan 2026 13:24:46 +0000 Subject: [PATCH 1/4] [Port] [6000.0] docg-7366: Fix links --- Packages/com.unity.shadergraph/Documentation~/Graph-Target.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md index 652b6b20eb4..05e4feb18b6 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md +++ b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md @@ -10,7 +10,7 @@ Target Settings are specific to each Target, and can vary between assets dependi Typically, each Target you select generates a valid subshader from the graph. For example, a Shader Graph asset with both URP and HDRP Targets will generate two subshaders. When you use a graph that targets multiple render pipelines, you must reimport the Shader Graph asset if you change the active render pipeline. This updates the Material Inspector for any Materials that use your graph. -Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), and the [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/render-pipelines). +Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/), and the [Built-In Render Pipeline](https://docs.unity3d.com/Documentation/Manual/built-in-render-pipeline.html). Not all blocks are compatible with all targets. If a block in your graph becomes inactive when you choose a target, that block is not compatible with that target. From 783a66fa03029b9884a2384df517872543b03160 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Fri, 9 Jan 2026 15:35:09 +0000 Subject: [PATCH 2/4] [Port] [6000.0] DOCG-8269 Remove typo in HDRP Fog Volume docs --- .../Documentation~/fog-volume-master-stack-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md index b2b0243f3f8..fe1d79b9f6b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md @@ -68,4 +68,4 @@ These settings appear when you select the Fog’s material in the Asset window. | **Fog Volume options** | | | | | **Single Scattering Albedo** | Control the color of each fog particle. The fog’s density doesn’t affect this color. | | | **Fog Distance** | Control how far you can see through the fog in meters. This controls how far the light passes through fog to affect how opaque it appears. A value of 0 makes the fog appear opaque. | -| | **Blend mode** | Determine how this fog shader blends with existing fog in the scene. This property overwrites the Blend mode you set in the Surface Options:
• **Overwrite:** Replaces existing fog in the volume area with this fog shader.Presented **content strategy** initiatives to leads in key team meetings.•**Additive:** Adds the color and density of this fog shader to other fog in the scene. This is the default value.
**Multiply:** Multiplies the color and density of this fog shader with other fog in the scene. You can use this to create effects relative to a specific fog density.
• **Min:** Determines the minimum density value of this fog shader and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.
• **Max:** Determines the maximum density value of this fog shader and the scene fog inside its bounding box. | +| | **Blend mode** | Determine how this fog shader blends with existing fog in the scene. This property overwrites the Blend mode you set in the Surface Options:
• **Overwrite:** Replaces existing fog in the volume area with this fog shader.
•**Additive:** Adds the color and density of this fog shader to other fog in the scene. This is the default value.
**Multiply:** Multiplies the color and density of this fog shader with other fog in the scene. You can use this to create effects relative to a specific fog density.
• **Min:** Determines the minimum density value of this fog shader and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.
• **Max:** Determines the maximum density value of this fog shader and the scene fog inside its bounding box. | From b570ddca1b660827f5e4f9eca99ca832e5910f03 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 15 Jan 2026 07:29:05 +0000 Subject: [PATCH 3/4] [Port] [6000.0] [UUM-131589] Prevent subgraph node starting drag on double-click --- .../Editor/Drawing/Views/MaterialNodeView.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs index c1848a12847..830d0220222 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs @@ -334,6 +334,9 @@ void OnSubGraphDoubleClick(MouseDownEvent evt) var path = AssetDatabase.GUIDToAssetPath(subgraphNode.subGraphGuid); ShaderGraphImporterEditor.ShowGraphEditWindow(path); + + // Stop the double click event from starting a drag action on the node + evt.StopImmediatePropagation(); } } From 9658c40624784cad850221d824a7ea8f9e9da204 Mon Sep 17 00:00:00 2001 From: Mikkel Simonsen Date: Thu, 15 Jan 2026 07:29:06 +0000 Subject: [PATCH 4/4] [Port] [6000.0] URP: Fix screen-space decals in Deferred --- .../Editor/Decal/DecalPass.template | 2 +- .../ShaderGraph/Includes/ShaderPassDecal.hlsl | 10 ++++++++-- .../Templates/URPDecal/PassGBuffer.template | 2 +- .../ShaderLibrary/NormalReconstruction.hlsl | 20 +++++++++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalPass.template b/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalPass.template index 14bf56eae64..505b6168591 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalPass.template +++ b/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalPass.template @@ -64,8 +64,8 @@ Pass #endif #if _RENDER_PASS_ENABLED #define GBUFFER3 0 + FRAMEBUFFER_INPUT_X_FLOAT(GBUFFER3); #define GBUFFER4 1 - FRAMEBUFFER_INPUT_X_HALF(GBUFFER3); FRAMEBUFFER_INPUT_X_HALF(GBUFFER4); #endif // Includes diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPassDecal.hlsl b/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPassDecal.hlsl index faebfde5ede..55cc9a23059 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPassDecal.hlsl +++ b/Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPassDecal.hlsl @@ -240,7 +240,9 @@ void Frag(PackedVaryings packedInput, #endif #if defined(DECAL_RECONSTRUCT_NORMAL) - #if defined(_DECAL_NORMAL_BLEND_HIGH) + #if defined(_RENDER_PASS_ENABLED) + half3 normalWS = half3(ReconstructNormalDerivative(input.positionCS.xy, LOAD_FRAMEBUFFER_X_INPUT(GBUFFER3, positionCS.xy).x)); + #elif defined(_DECAL_NORMAL_BLEND_HIGH) half3 normalWS = half3(ReconstructNormalTap9(positionCS.xy)); #elif defined(_DECAL_NORMAL_BLEND_MEDIUM) half3 normalWS = half3(ReconstructNormalTap5(positionCS.xy)); @@ -248,7 +250,11 @@ void Frag(PackedVaryings packedInput, half3 normalWS = half3(ReconstructNormalDerivative(input.positionCS.xy)); #endif #elif defined(DECAL_LOAD_NORMAL) - half3 normalWS = half3(LoadSceneNormals(positionCS.xy)); + #if defined(_RENDER_PASS_ENABLED) + half3 normalWS = normalize(LOAD_FRAMEBUFFER_X_INPUT(GBUFFER2, positionCS.xy).rgb); + #else + half3 normalWS = normalize(LoadSceneNormals(positionCS.xy).rgb); + #endif #endif float2 positionSS = FoveatedRemapNonUniformToLinearCS(input.positionCS.xy) * _ScreenSize.zw; diff --git a/Packages/com.unity.render-pipelines.universal/Editor/VFXGraph/Shaders/Templates/URPDecal/PassGBuffer.template b/Packages/com.unity.render-pipelines.universal/Editor/VFXGraph/Shaders/Templates/URPDecal/PassGBuffer.template index 0b2b53f207f..539b1e6a1c3 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/VFXGraph/Shaders/Templates/URPDecal/PassGBuffer.template +++ b/Packages/com.unity.render-pipelines.universal/Editor/VFXGraph/Shaders/Templates/URPDecal/PassGBuffer.template @@ -44,8 +44,8 @@ #if _RENDER_PASS_ENABLED #define GBUFFER3 0 + FRAMEBUFFER_INPUT_X_FLOAT(GBUFFER3); #define GBUFFER4 1 - FRAMEBUFFER_INPUT_X_HALF(GBUFFER3); FRAMEBUFFER_INPUT_X_HALF(GBUFFER4); #endif diff --git a/Packages/com.unity.render-pipelines.universal/ShaderLibrary/NormalReconstruction.hlsl b/Packages/com.unity.render-pipelines.universal/ShaderLibrary/NormalReconstruction.hlsl index 85d27e6db12..d59972c6dfb 100644 --- a/Packages/com.unity.render-pipelines.universal/ShaderLibrary/NormalReconstruction.hlsl +++ b/Packages/com.unity.render-pipelines.universal/ShaderLibrary/NormalReconstruction.hlsl @@ -20,6 +20,26 @@ float GetRawDepth(float2 uv) // https://github.com/keijiro/DepthInverseProjection // constructs view space ray at the far clip plane from the screen uv // then multiplies that ray by the linear 01 depth +float3 ViewSpacePosAtScreenUV(float2 uv, float deviceDepth) +{ + float3 viewSpaceRay = mul(_NormalReconstructionMatrix[unity_eyeIndex], float4(uv * 2.0 - 1.0, 1.0, 1.0) * _ProjectionParams.z).xyz; + return viewSpaceRay * Linear01Depth(deviceDepth, _ZBufferParams); +} + +float3 ViewSpacePosAtPixelPosition(float2 positionSS, float deviceDepth) +{ + float2 uv = positionSS * _ScreenSize.zw; + return ViewSpacePosAtScreenUV(uv, deviceDepth); +} + +half3 ReconstructNormalDerivative(float2 positionSS, float deviceDepth) +{ + float3 viewSpacePos = ViewSpacePosAtPixelPosition(positionSS, deviceDepth); + float3 hDeriv = ddy(viewSpacePos); + float3 vDeriv = ddx(viewSpacePos); + return half3(SafeNormalize(cross(hDeriv, vDeriv))); +} + float3 ViewSpacePosAtScreenUV(float2 uv) { float3 viewSpaceRay = mul(_NormalReconstructionMatrix[unity_eyeIndex], float4(uv * 2.0 - 1.0, 1.0, 1.0) * _ProjectionParams.z).xyz;