cancel
Showing results for 
Search instead for 
Did you mean: 

VR.WaitForGPU killing performance in Unity3D. Very difficult to profile other issues. Video Example

RaveTZ
Protege
Here is a video showing what the issue is
https://youtu.be/n5ngEzZSKH0

I'm trying to release an update to Vanguard V but perforance has become a real issue.  The game runs at 150fps on my laptop but the framerate tanks when I touch the Oculus headset.  I get these nasty yellow spikes and the FPS tanks to the 50s, even on my desktop (980 GTX TI).  I then created a new scene with nothing but a camera and the default Directional Light.  The framerate goes into the 800s until I touch the headset.  It then tanks again to 90-100fps.  This is an empty scene.

Now, if this is by "design" it has made it very difficult to isolate any real issues in the profiler.  Any help would be great.

Unity 5.5.1f1 and observed in Unity 5.5.2 as well
Windows 10 x64




13 REPLIES 13

deftware
Expert Protege

RaveTZ said:



When the headset is active, frame-rate is being locked/synched to 90fps, even if your cpu/gpu could push further. It's a similar principle to having v-sync enabled on a monitor.


And there is the problem.  ASW is locking it to 45 for a duration every time it has a slight dip below 90.


If it dips below 90 it is by design going to halve the locked FPS rate, to 45, because the goal is to avoid any frame tearing on the display. This is similar to how consoles will dance between 60/30 FPS to prevent frame tearing.

Do you get drops to 45 in an empty scene?

Spoon420
Explorer
I seem to be having a similar issue. No matter how empty a scene is, I can't seem to get more than 60fps almost like it is syncing with my monitor, instead of my headset. This Thread was 2 years ago.

pawbab
Honored Guest

I know this is quite an old thread, but in case anyone was looking for a solution that I stumbled upon, this is:

Specification: Unity 2022.3 LTS
Pipelines: URP
Build settings: PC, SteamVR

When the problem occurred: After turning on the second camera (even on an empty stage)

What caused the performance drop: added Screen Space Ambient Occlusion in RendererFeatures.

Solution:
I duplicated AssetRenderer and disabled Screen Space Ambient Occlusion for it. In the Render Pipeline Asset, I added a duplicate AssetRenderer to the RendererList. In the second camera, in the Rendering section, I set the Renderer to the duplicate one. This allowed the first camera to have Screen Space Ambient Occlusion and the second not.

This solved my problem. I hope I could help someone (even myself from the future if I forgot :D)

mightychili
Honored Guest

Came here with a different, but related issue, where the HoloLens 2 build with MRTK 2.8.3 was showing very low FPS due to FrameEvents.xrBeginFrame and WaitForGPU. Removing an unused camera from the scene, similarly to what @pawbab suggested solved the issue.