Search Issue Tracker
By Design
Votes
0
Found in [Package]
10.0.0-preview.26
Issue ID
1281319
Regression
No
[URP] GPU instanced meshes are divided into two or four meshes depending on camera distance and angle
Reproduction steps:
1. Open attached project "InstancingTest.zip" and scene "120-left"
2. Enable Frame Debug
3. In Frame Debug window, observe number of RenderLoop.Draw calls
4. In Hierarchy window, disable "Main Camera (Far)" and enable "Main Camera (Near)" GameObject
5. In Frame Debug window, observe number of RenderLoop.Draw calls
Expected result: The number of calls remains at 2
Actual result: The number of calls increases to 4
Reproducible with: 7.5.1(2019.4.12f1), 9.0.0-preview.55(2020.1.8f1), 10.0.0-preview.26(2020.2.0b6)
Could not test with: 2018.4.27f1 (URP package unavailable)
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Working as intended - the sorting system uses a quantized sorting algorithm to group objects in to depth buckets before grouping them by state/material. Close in to the camera these buckets start off small, but increase in size (depth wise) as you move away from the camera, thus close in you get more batches, but further out you get less as the distances all fall in to the same bucket. This aids the GPU's zbuffer usage, as well as allows for objects to be grouped together quickly, acting as both a CPU and GPU optimisation.