I've been having performance issues on my GearVR app (developed on Unity 5.4) so I decided to do a small experiment and set up the simplest possible scene to study performance:
- One static plane
- One static cube
- Both with the same material: mobile unlit shader with 8X8 unicolor texture
- One baked directional light
- Default fastest quality settings
- Default player settings save for VR enabled and multi-threaded rendering enabled
On my PC, when I look at the profiler I get the following profile:
About what you'd expect: close to 4000 FPS.
However when I build my exact same scene and run it on my Galaxy S6 (with ETC2 GLES 3.0 texture compression), I get this profile:
It's now gone down to about 60FPS. WTF? When I look a bit more into the details I see that the vast majority of the CPU usage time is spent waiting for the GPU:
And then when I look at the GPU usage I see that it spends 99% of its time applying GUITexture.draw:
The problem is... there is no freaking GUI texture in my very simple scene! I don't understand any of this. Could someone explain to me what is happening and how to reduce the extreme difference in performance between PC and mobile?