Search Issue Tracker
By Design
Votes
0
Found in
5.3.2f1
Issue ID
785790
Regression
Yes
Increased amount of draw call batches between 5.0 and 5.3
How to reproduce:
1. Open project from case 785790
2. Open scene Maps/Scenes/Terminal_DM.unity
3. Play the scene
- Note the large amount of Batches (130+) in the Stats window
- The amount of batches is consistently low (~35) in Unity 5.0
- Reproduced in Version 5.3.4p4 (43a3882ae25c), Version 5.4.0b15 (2e995a1aa11c) on a computer with an Intel HD 4000 graphics adapter
- Not reproducible in Version 5.0.4f1 (1d75c08f1c9c)
- Not reproducible on a Late-2015 iMac (AMD Radeon R9 M390 2048 MB)
- By Design: In Unity 5.1 or 5.2, we changed default opaque object sorting mode to be more efficient for GPUs (at expense of potentially more batches on the CPUs). Now opaque objects are roughly sorted front-to-back, instead of purely by material like before.
- If your situation is that you don't need that extra GPU efficiency (e.g. the bottleneck is not the GPU), but need the CPU efficiency back, you can change the default to use no distance based sorting. See http://docs.unity3d.com/ScriptReference/Camera-opaqueSortMode.html
- With a script like this attached to the camera, and sorting mode set to NoDistanceSort, one can get the same amount of batches (30, instead of 36) as in Unity 5.0.
using UnityEngine;
public class CameraSortMode : MonoBehaviour
{
public UnityEngine.Rendering.OpaqueSortMode m_SortMode = UnityEngine.Rendering.OpaqueSortMode.Default;
void Update ()
{
GetComponent<Camera> ().opaqueSortMode = m_SortMode;
}
}
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
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Aras
May 19, 2016 10:18
By design, sometime after 5.0 opaque object sorting was changed a bit. http://docs.unity3d.com/ScriptReference/Camera-opaqueSortMode.html