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
- VR build is not displayed when headset is in standby upon initial launch
- Subasset references are incorrectly redirected when editing prefabs in Prefab Mode
- [macOS] KeyDownEvent.originalMousePosition returns incorrect coordinates when last focused element was a TextField in text editing mode
- Some HDRP Wizard tooltips are rendered outside the window
- Shader error is thrown when using a Compute Shader with a second kernel
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.