I’ve already disabled Dynamic Batching and Instancing, but it still try to draw far object first.
This causes heavy overdraw for opaque obj, how should I fix this?(But on Editor, it seems working well from frame debugger)
no one?
last try
Also experiencing this issue, specifically on Android. Editor seems to be fine. Additionally, I’ve noticed that using additive scenes is another source of overdraw (objects in different additive scenes draw over each other)
I noticed this years ago on a quest1 project. I guess the tiled renderer in some android devices forces a different kind of sorting. As a short and easy to implement solution you probably want to try to combine more objects (maybe just with static batching) and force some objects to draw later with queue offsets. While it isn’t nice it works. That additive scenes behave differently as one big scene sounds scary though.
After a long research, I’ve discovered:
- Overdraw of opaque objects does NOT affect most devices in any way. (test devices: Pixel 4A, Galaxy S21 Ultra)
- Overdraw is mostly caused by having “No distance sort” in Camera settings, which is hidden from developer in inspector, but available via scripting (Unity - Scripting API: OpaqueSortMode). Older devices seem to use “Default = No distance sort” (Pixel 4A), newer devices have “Default = Front to back” mode (S21 Ultra). You can override this behaviour with code, but, according to my tests, it makes absolutely no difference related to frame timings.
- Additive scenes are not the cause of the issue. It’s mainly due to broken occlusion culling (if used) with Addressables (and Asset Bundles in general). More info described here (two sequential posts): Occlusion Culling not Working in one area??? Help!!!!
- Transparency and alpha-clipping may affect rendering, causing it to render “to camera” instead of “from camera”. If possible, avoid all usage of alpha for better performance.
1 Like