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
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
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"