Skip to content

Commit c7b5bf8

Browse files
[ShaderGraph][HD][8.x.x] Fix for Scene Depth node and Keywords (#61)
* move the location of keyword generation * Update CHANGELOG.md
1 parent 53953d9 commit c7b5bf8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,10 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass
841841

842842
ShaderGenerator defines = new ShaderGenerator();
843843
{
844+
defines.AddShaderChunk("// Shared Graph Keywords");
845+
defines.AddShaderChunk(shaderKeywordDeclarations.ToString());
846+
defines.AddShaderChunk(shaderKeywordPermutations.ToString());
847+
844848
defines.AddShaderChunk(string.Format("#define SHADERPASS {0}", pass.ShaderPassName), true);
845849
if (pass.ExtraDefines != null)
846850
{
@@ -894,10 +898,6 @@ public static bool GenerateShaderPass(AbstractMaterialNode masterNode, Pass pass
894898
shaderPassIncludes.AddShaderChunk(include);
895899
}
896900

897-
defines.AddShaderChunk("// Shared Graph Keywords");
898-
defines.AddShaderChunk(shaderKeywordDeclarations.ToString());
899-
defines.AddShaderChunk(shaderKeywordPermutations.ToString());
900-
901901
// build graph code
902902
var graph = new ShaderGenerator();
903903
{

com.unity.shadergraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717
- 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)
1818
- 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/)
1919
- Optimized loading a large Shader Graph. [1209047](https://issuetracker.unity3d.com/issues/shader-graph-unresponsive-editor-when-using-large-graphs)
20+
- 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/)
2021

2122
## [8.0.1] - 2020-05-25
2223

0 commit comments

Comments
 (0)