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

Package: Scriptable Render Pipeline Universal

-

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)

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.