Search Issue Tracker
Active
Votes
0
Found in
2021.3
2021.3.1f1
2022.1
2022.2
Issue ID
1423032
Regression
No
SRP Batcher compatibility on a Shader breaks when Turning On "Alpha Clipping" and allowing Material Override on a Material
How to reproduce:
1. Create a new URP Template project
2. Download the HDRP package into the project
3. Create a new empty Shader Graph (Create -> Shader Graph -> Blank Shader Graph)
4. Open the newly created Shader Graph asset
5. Add HDRP and Universal to the "Active Targets" in the Graph Settings section
6. Expand "Surface Options" of HDRP in the Graph Inspector and Turn On "Alpha Clipping"
7. In the Graph Inspector navigate to Graph Settings and Turn On "Allow Material Override" of the Universal section
8. Save the Shader Graph Asset (Save Asset)
9. Create a new Material and assign the modified Shader Graph to it
10. Turn On "Alpha Clipping" in the Material settings of the Inspector window
Expected result: SRP Batcher is shown as Compatible
Actual result: "UnityPerMaterial CBuffer inconsistent size inside a SubShader (Universal Forward)" is thrown
Reproducible with: 12.0.0 (2021.2.0b1), 12.1.7 (2021.3.4f1), 13.1.8 (2022.1.4f1), 14.0.3 (2022.2.0a16)
Couldn't test with:
7.7.1 (2019.4.39f1) - No Graph Inspector which is required for reproduction
10.9.0 (2020.3.35f1), 11.0.0 (2021.1.28f1), 12.0.0 (2021.2.0a21) - No "Allow Material Override" setting
Note:
- Closing and reopening the project fixes the issue
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Sprite Preview is broken when the Sprite is too tall or too wide
- Objects are invisible in Scene view when using Wireframe Shading Mode
- The property of a component becomes read-only when it is bound to "PropertyStreamHandle"
- Physics.Raycast does not work when used on the whole model
- Shader Graph changes the Position of Prefab instances in Play mode
Add comment