I’m building a game for the Gear VR, so it needs to render twice and hit 60fps on a Samsung Note 4. I’m running into performance trouble, and I’m posting here since I think the problem might extend to mobile projects in general.
I’m trying to build a game that involves a lot of small, simple objects in view at once. Mindful of the performance limitations of mobile VR development, I started out by building a stress test scene. So far, it seems that having large numbers of rendered objects in the scene is a huge performance killer. My current test involves 2000 trivial quads (1k per eye). Even though this involves only 8k vertices, and even when they’re all batched into a couple of draw calls (either dynamically or statically), this is enough to bring the framerate well below 60FPS.
So: Is it common for ~2k objects to drag down performance like this, even if they’re trivial and fully batched?
If that’s just a limitation of Unity on the Note 4, I’ll deal with it, but this strikes me as weird. Especially because I can have much more geometric complexity, and many more draw calls, and still run fast! So I’m thinking/hoping/praying that there’s something wrong, and this problem might just go away after a quick fix.
I’ve already checked most of the more obvious potential culprits. The scene has no extraneous elements, the shaders are simple, the Quality Settings are correct, and the dev software is up-to-date (Unity 4.6.3f1, Mobile SDK 0.5.0, Oculus Runtime 0.5.0.1). The profiler shows that the biggest problem is the CPU rendering time (and also that I’m running into the Gfx.WaitForPresent problem discussed in this thread). I’ve also noticed that the reported framerate tends to be at 30fps or 60fps without much time in-between, almost as if it’s trying to V-Sync, even though that’s definitely disabled in the settings.
Here’s a screenshot of the profiler results. Note the 2000 calls to FFWD Lights, even though the scene only includes unlit materials. (Is that normal?)
Also, a single-camera screenshot of the stress test itself (note that fill rate shouldn’t be a problem here) and a__nother of the Oculus Remote Monitor__ (not sure how to read this info, really).
If I just needed to render quads, I’d happily combine them into a single mesh (which works fine) and call it a day, but unfortunately this is just a stand-in for more complex moving objects that can’t be combined. Halp!