Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
appminis's avatar
appminis
Explorer
9 years ago

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

10 Replies

Replies have been turned off for this discussion
  • Screenshot of profiler: https://gyazo.com/5e510268ddcb00b7f2d495d1f1ce7f11

  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    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?
  • 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.
  • 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?
  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    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.
  • 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.
  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    No. If anything, the editor typically performs worse than standalone. Maybe it's on a different quality level? Check the quality settings.
  • 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!
  • 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.