Skip to main content
Up and Coming
June 22, 2016

Terrible VR performance, good desktop performance

Getting 120+ fps on desktop, but 50-60 in a Rift. Creating a build outside the editor drops it a bit more as well.

What could possibly be the issue? I've tried profiling and going through every element one by one, but can't pin it to anything. I'm hoping I am just missing something simple? I am on 5.4.b22
    This topic has been closed for replies.

    10 replies

    appminisAuthor
    Up and Coming
    June 22, 2016
    Screenshot of profiler: https://gyazo.com/5e510268ddcb00b7f2d495d1f1ce7f11

    Inspiring
    June 22, 2016
    1.6M vertices / 1.3M triangles is probably too high when rendering at the high resolution and with the tighter timing requirements of VR. Can you get it below 1M of each?
    appminisAuthor
    Up and Coming
    June 22, 2016
    Will try to reduce that, but I'm not totally sure if its related.  Even reducing it causes framerate drop.  What is VR.WaitForGPU? It takes up a massive amount of time.
    appminisAuthor
    Up and Coming
    June 22, 2016
    Tried optimizing extensively.  I feel like its something random.  5.4.3b22 not working right?  I shouldn't be using native Unity VR support? (though I've used OVR and it was the same).  I'm missing a specific setting?  Vsync?
    appminisAuthor
    Up and Coming
    June 22, 2016
    Or maybe its the SDK?
    Inspiring
    June 22, 2016
    What is VR.WaitForGPU? It takes up a massive amount of time.
    That's when the CPU is waiting for the GPU. The solution is to put less work on the GPU.
    appminisAuthor
    Up and Coming
    June 23, 2016
    Thanks Dave - is there any reason it would run fine in the Editor (VR enabled) and not when a build is made?

    I turned off my terrain and tried some things, and it runs smoothly.  As soon as I make a build and try that, it judders like crazy.
    Inspiring
    June 23, 2016
    No. If anything, the editor typically performs worse than standalone. Maybe it's on a different quality level? Check the quality settings.
    appminisAuthor
    Up and Coming
    June 24, 2016
    Dave - in case anyone else hits a similar issue, we discovered this was due to a specific camera effect (Horizontal Based Ambient Occlusion).  Very important to look at every camera effect as the compatibility with VR is limited.  Thanks!
    New Participant
    June 29, 2016
    There are a lot of performance optimization methods that you have to go through to get a decent refresh rate out of gear VR. 
    Make sure that you have less than 100k triangles per frame - low poly models
    less than 50 set pass calls- sharing same materials among models
    Use as few textures as possible 
    Bake lightmaps for static objects - This made a huge difference in set pass calls for my project 
    Also use one scripting language for the whole project.