Search Issue Tracker
By Design
Votes
0
Found in
2021.3.36f1
2022.3.22f1
2023.2.15f1
6000.0.0b12
Issue ID
UUM-67526
Regression
No
Custom shader is displayed incorrectly in the Play Mode when SRP Batcher is enabled
Reproduction steps:
1. Open the attached “repro_IN-71109“ project
2. Open the “SampleScene“
3. Select the “/Assets/Settings/URP-Balanced.asset“ and, under the “Rendering”, enable the “SRP Batcher“
4. Enter the Play Mode
5. Observe the Game view
Expected result: Half of the “Sphere“ GameObjects change their visual appearance
Actual result: All of the Sphere“ GameObjects change their visual appearance
Reproduced with: 2021.3.36f1, 2022.3.22f1, 2023.2.15f1, 6000.0.0b12
Reproducible on: Windows 10 (22H2)
Not reproducible on: No other environments tested
Notes:
- Reproducible in Player
- Making the Timer shader variable declaration be per material fixes the issue
- If you’re not able to see the “SRP Batcher“ parameter, make sure that the “Visibility“ is set to “All Visible“ in the “Edit → Preferences → Core Render Pipeline“
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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Resolution Note:
The custom shader is using a shader var "_Timer" that could be different per sphere (and each sphere is using its own material). This property "Timer" could have one different value per sphere. In ShaderGraph, the scope of this "Timer" var should be "Per Material" instead of "Global"