From e9b903e7c4f2a6ef449041a5894d18caaceb2858 Mon Sep 17 00:00:00 2001 From: Alex Lindman Date: Mon, 23 Mar 2020 10:24:23 -0700 Subject: [PATCH 1/2] move the location of keyword generation --- .../Editor/ShaderGraph/HDSubShaderUtilities.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index fdfa25604b6..84e9a9d41a4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -841,6 +841,10 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass ShaderGenerator defines = new ShaderGenerator(); { + defines.AddShaderChunk("// Shared Graph Keywords"); + defines.AddShaderChunk(shaderKeywordDeclarations.ToString()); + defines.AddShaderChunk(shaderKeywordPermutations.ToString()); + defines.AddShaderChunk(string.Format("#define SHADERPASS {0}", pass.ShaderPassName), true); if (pass.ExtraDefines != null) { @@ -894,10 +898,6 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass shaderPassIncludes.AddShaderChunk(include); } - defines.AddShaderChunk("// Shared Graph Keywords"); - defines.AddShaderChunk(shaderKeywordDeclarations.ToString()); - defines.AddShaderChunk(shaderKeywordPermutations.ToString()); - // build graph code var graph = new ShaderGenerator(); { From 6197ee1571ebf491939872b79a1e61f0081d69d9 Mon Sep 17 00:00:00 2001 From: Alex Lindman Date: Mon, 23 Mar 2020 11:21:30 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- com.unity.shadergraph/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index f2cd5e58245..c9731776a77 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a bug where adding a HDRP Master Node to a Shader Graph would softlock the Shader Graph. - Fixed a bug where the input fields sometimes didn't render properly. [1176268](https://issuetracker.unity3d.com/issues/shadergraph-input-fields-get-cut-off-after-minimizing-and-maximizing-become-unusable) - Fixed a bug with the `Transform` node where converting from `Absolute World` space in a sub graph causes invalid subscript errors. [1190813](https://issuetracker.unity3d.com/issues/shadergraph-invalid-subscript-errors-are-thrown-when-connecting-a-subgraph-with-transform-node-with-unlit-master-node) +- Fixed a bug where `Scene Depth` nodes would stop working after adding a keyword on the blackboard. [1203333](https://issuetracker.unity3d.com/product/unity/issues/guid/1203333/) ## [8.0.1] - 2020-05-25