Search Issue Tracker
By Design
Votes
5
Found in [Package]
7.1.7
Issue ID
1204801
Regression
No
[URP] Clear(color) and Draw Mesh methods called for each Sorting Layer
Reproduction steps:
1. Open project in "MyRepro.zip"
2. Open Scene "0a18.unity"
3. Notice that UniversalRP-HighQuality is using 2D Renderer Data (Assets -> Settings)
4. Notice that all 3 Sprites are in Sorting Layer "Default"
5. Notice that Point Lights affect all 3 Sorting Layers
6. Open Frame Debugger and enable it (Windows -> Analysis -> Frame Debugger)
Expected result: Draw Mesh method gets called once per Light
Actual result: Draw Mesh method gets called for each Sorting Layer, deleting previously drawn Lights and drawing them again
Reproducible with: URP 6.9.2 (2019.2.18f1), URP 7.1.7 (2019.3.0f4, 2020.1.0a18)
Could not test with 2018.4 (No 2D Renderer Data)
Note: even if none of the Sprites are using that Sorting Layer the Light still will call Clear (color) and Draw Mesh. The result that's left will be what stays after the last Draw
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
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
- The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
Resolution Note:
This is how the 2D lighting system is currently designed to work. We know it's not optimal when every sorting layer has an identical set of lights, and are looking into ways we can merge layers in this situation. However, we don't consider the current behavior a bug. We'll be tracking this issue with our project planning tool instead.