GearVR performance down 50% with Unity 5.1

Hey Folks,

We’ve been getting terrible performance on our GearVR application with Unity 5.1 (5.1.1 and 5.1.2). The app runs at 50fps on Unity 4.6.7 & 5.0.1, but at 25fps on 5.1. Anyone have any idea what might be causing that? Is it a known issue with an incoming fix?

Here’s the link to the Oculus forum tracking the info there:

Thanks,
Saswat

Are you using the Oculus plugin on 5.1 or did you switched to the native integration ?
In our project, we experienced the same performance “drop” when we switched to the native integration on 5.1 (almost 50% FPS loss). The 5.2 beta seems to solve this issue, but 5.1 is definitively broken for VR.

We’re using the Oculus Mobile SDK 0.6.0.1 (though the problem occurs with 0.5.0 too). Not using the native VR stuff in Unity. We’ll give 5.2 beta a shot today and see if it resolves the issue. Thanks!

Nope, Unity 5.2.0b1 still has the same issues when using the Oculus SDK.

Have you profiled the app on both versions and compared the two? Which functions are taking up more time in the newer Unity Versions compared to 5.0 or 4.6? Is this only happening with GearVR or does it happen in the Editor too for Oculus builds? What about Standalone Oculus builds? Are the Editor and GearVR profiles the same hits or do you see different performance hits in the Editor vs GearVR? Is it GPU or CPU bound? Possibly both are taking up too much time?

I’ve been doing some testing between 4.6.7 and 5.1 / 5.2 and found out the same issue. First I thought the slowness would be because of Unity5 being able to draw terrain with more textures (4.6 just seemed to fallback to simpler look on mobile). I just tested on 5.2 by forcing “legacy vertex lit” rendering path (w/GLES 3 renderer), which makes the terrain look as simple as with 4.6, but that build is still clearly slower than the one built with 4.6.

Unfortunately I don’t have any exact profiling / measurement info (have some time pressure and been running so many different tests over different Unity versions in the last days, just trying to decide pros/cons of which one to use “for now”).

BTW, perhaps the issue of thread is connected to this one:

(I’m using pro version both on 4.x and 5.x).

Edit: A few further details… Both 4.x and 5.x builds are using occlusion culling (and when verifying inside editor the configuration for that seem to be ok). In 4.x build the terrain also has a lightmap, in 5.x there’s not even a lightmap on the terrain (having separate issues with the 5.x lightmapping).