Skip to content

Commit dbc6f72

Browse files
author
Chris Tchou
authored
[11.x] [HDRP] [bugfix 1292501] - Ensure all passes request the DiffusionProfile for SRP batcher compatibility (#2790)
* Fix for 1292501 (cherry pick of 0104bdd) # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs * Adding changelog
1 parent 1d37e20 commit dbc6f72

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-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
@@ -58,6 +58,7 @@ The version number for this package has increased due to a version update of a r
5858
- Fixed SSGI texture allocation when not using the RenderGraph.
5959
- Fixed NullReference Exception when setting Max Shadows On Screen to 0 in the HDRP asset.
6060
- Fixed issue with saving some quality settings in volume overrides (case 1293747)
61+
- Fixed issue where some ShaderGraph generated shaders were not SRP compatible because of UnityPerMaterial cbuffer layout mismatches [1292501] (https://issuetracker.unity3d.com/issues/a2-some-translucent-plus-alphaclipping-shadergraphs-are-not-srp-batcher-compatible)
6162

6263
### Changed
6364
- Volume Manager now always tests scene culling masks. This was required to fix hybrid workflow.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ static public PassDescriptor GenerateShadowCaster(bool supportLighting)
169169
BlockFields.SurfaceDescription.AlphaClipThreshold,
170170
HDBlockFields.SurfaceDescription.AlphaClipThresholdShadow,
171171
HDBlockFields.SurfaceDescription.DepthOffset,
172+
HDBlockFields.SurfaceDescription.DiffusionProfileHash // not used, but keeps the UnityPerMaterial cbuffer identical
172173
},
173174

174175
// Collections
@@ -545,13 +546,15 @@ public static PassDescriptor GenerateTransparentDepthPrepass(bool supportLightin
545546
BlockFields.SurfaceDescription.NormalWS,
546547
BlockFields.SurfaceDescription.NormalOS,
547548
BlockFields.SurfaceDescription.Smoothness,
549+
HDBlockFields.SurfaceDescription.DiffusionProfileHash // not used, but keeps the UnityPerMaterial cbuffer identical
548550
} :
549551
new BlockFieldDescriptor[]
550552
{
551553
BlockFields.SurfaceDescription.Alpha,
552554
HDBlockFields.SurfaceDescription.AlphaClipThresholdDepthPrepass,
553555
BlockFields.SurfaceDescription.AlphaClipThreshold,
554556
HDBlockFields.SurfaceDescription.DepthOffset,
557+
HDBlockFields.SurfaceDescription.DiffusionProfileHash // not used, but keeps the UnityPerMaterial cbuffer identical
555558
},
556559

557560
// Collections

0 commit comments

Comments
 (0)