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;
}
}
Comments (1)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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