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
- Select Preset "None" icon changes after switching tabs
- [Android] Crash when using xxHash3 and targeting the ARMv7 Architecture with IL2CPP Scripting Backend
- GameObject reference in a Script Component becomes missing when unpacking a variant of another Prefab variant
- Project Settings vertical separator position is not synchronized with the mouse position when dragging it horizontally
- Crash on PhysicsDebugDraw::SelectFiltering::Update when entering play mode with Physics Debug window docked and unfocused
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.