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
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
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.