Skip to content

[ShaderGraph][HD][7.x.x] Fix for Scene Depth node and Keywords #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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();
{
Expand Down
1 change: 1 addition & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- 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/)
- 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/)

## [7.3.0] - 2020-03-11

Expand Down