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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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"