Search Issue Tracker
By Design
Votes
0
Found in
2021.3.34f1
2022.3.17f1
2023.2.4f1
2023.3.0b1
6000.0.0b11
Issue ID
UUM-60286
Regression
No
SRP Batch call gets split when two GameObjects are using the same shader with no Keywords
Reproduction steps:
1. Open the attached “BatchBreak” project
2. Open the “Assets/SampleScene” Scene
3. Open the Window > Analysis > Frame Debugger window
4. In the Frame Debugger window press the “Enable” button
5. In the Frame Debugger window Hierarchy inspect the {DrawCall} element
Expected result: There is only one “SRP Batch” draw call
Actual result: There are two “SRP Batch” calls with a reason: “SRP: Node use different shader keyword” for the second draw call
Reproducible with: 2021.3.34f1, 2022.3.17f1, 2023.2.4f1, 2023.3.0b1
Reproducible on: macOS 13.6.3
Not reproducible on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [macOS] Editor crashes after entering Play mode with overlapping GameObjects with Cloth Component and Cloth Inter-Collision enabled
- Look Dev constantly regenerates the default Volume Profile when set to "None" instead of using the default one
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
- Look Dev window flickers when resizing the window after docking it
Resolution Note:
Internally batching happens based somewhat on renderer setting. In this situation you have two cubes that are light mapped and a ball that is rendered using probes for it's global illumination. Internally the render loop will look at this and batch the cubes together before looking at the sphere and realising that it needs to use a different configuration.
Internally this activates a new keyword causing the batch break. The frame debugger only shows keywords as used by the shader and in this case there are no keywords. Essentially the global keyword state has changed between these calls.
This is intentional as we try to batch lightmapped objects that share a lightmap together and then probe GI objects together. If there was actual other objects that used probe lighting they would be batched with this ball.