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 ab7f831c542..dd362a78cfa 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(); { diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index c4b6fba3f50..d368c5efa58 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - 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 the `Position` node would change coordinate spaces from `World` to `Absolute World` when shaders recompile. [1184617](https://issuetracker.unity3d.com/product/unity/issues/guid/1184617/) - Optimized loading a large Shader Graph. [1209047](https://issuetracker.unity3d.com/issues/shader-graph-unresponsive-editor-when-using-large-graphs) +- 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