Skip to content

Commit c4ea601

Browse files
- Fixed shader graph not supporting indirectdxr multibounce (case 1294694). (#2933)
Co-authored-by: sebastienlagarde <[email protected]>
1 parent f0ae90b commit c4ea601

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3939
- Fixed white screen when undoing in the editor.
4040
- Fixed display of LOD Bias and maximum level in frame settings when using Quality Levels
4141
- Fixed an issue when trying to open a look dev env library when Look Dev is not supported.
42+
- Fixed shader graph not supporting indirectdxr multibounce (case 1294694).
4243

4344
### Changed
4445
- Removed the material pass probe volumes evaluation mode.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,11 @@ public static PassDescriptor GenerateLitRaytracingPrepass()
878878

879879
#region Raytracing Indirect
880880

881+
public static KeywordCollection IndirectDiffuseKeywordCollection = new KeywordCollection
882+
{
883+
{ CoreKeywordDescriptors.multiBounceIndirect },
884+
};
885+
881886
public static PassDescriptor GenerateRaytracingIndirect(bool supportLighting)
882887
{
883888
return new PassDescriptor
@@ -891,6 +896,7 @@ public static PassDescriptor GenerateRaytracingIndirect(bool supportLighting)
891896
// Collections
892897
pragmas = CorePragmas.RaytracingBasic,
893898
defines = supportLighting ? RaytracingIndirectDefines : null,
899+
keywords = supportLighting ? IndirectDiffuseKeywordCollection : null,
894900
includes = GenerateIncludes(),
895901
};
896902

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,15 @@ static class CoreKeywordDescriptors
13241324
definition = KeywordDefinition.ShaderFeature,
13251325
scope = KeywordScope.Local,
13261326
};
1327+
1328+
public static KeywordDescriptor multiBounceIndirect = new KeywordDescriptor
1329+
{
1330+
displayName = "Multi Bounce Indirect",
1331+
referenceName = "MULTI_BOUNCE_INDIRECT",
1332+
type = KeywordType.Boolean,
1333+
definition = KeywordDefinition.MultiCompile,
1334+
scope = KeywordScope.Global,
1335+
};
13271336
}
13281337
#endregion
13291338
}

0 commit comments

Comments
 (0)