diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 4f37a99dd0d..1bd570e18c3 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed white screen when undoing in the editor. - Fixed display of LOD Bias and maximum level in frame settings when using Quality Levels - Fixed an issue when trying to open a look dev env library when Look Dev is not supported. +- Fixed shader graph not supporting indirectdxr multibounce (case 1294694). ### Changed - Removed the material pass probe volumes evaluation mode. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs index 918925d1ae3..a2ab4acf30f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs @@ -878,6 +878,11 @@ public static PassDescriptor GenerateLitRaytracingPrepass() #region Raytracing Indirect + public static KeywordCollection IndirectDiffuseKeywordCollection = new KeywordCollection + { + { CoreKeywordDescriptors.multiBounceIndirect }, + }; + public static PassDescriptor GenerateRaytracingIndirect(bool supportLighting) { return new PassDescriptor @@ -891,6 +896,7 @@ public static PassDescriptor GenerateRaytracingIndirect(bool supportLighting) // Collections pragmas = CorePragmas.RaytracingBasic, defines = supportLighting ? RaytracingIndirectDefines : null, + keywords = supportLighting ? IndirectDiffuseKeywordCollection : null, includes = GenerateIncludes(), }; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs index 8f382d1759d..aacd9b2a39f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDTarget.cs @@ -1324,6 +1324,15 @@ static class CoreKeywordDescriptors definition = KeywordDefinition.ShaderFeature, scope = KeywordScope.Local, }; + + public static KeywordDescriptor multiBounceIndirect = new KeywordDescriptor + { + displayName = "Multi Bounce Indirect", + referenceName = "MULTI_BOUNCE_INDIRECT", + type = KeywordType.Boolean, + definition = KeywordDefinition.MultiCompile, + scope = KeywordScope.Global, + }; } #endregion }