I’ve been trying to switch my project from 2021 LTS (latest version) to 2022 LTS. I’ve tried both 2022.3.0 and 2022.3.1, and in both cases I just can’t get decent VR performance in the editor. My project runs smoothly in 2021, but can’t maintain 72 fps on a RTX3080T1 with 2022.
I tried a build with 2022.3.0 (Android APK for Quest 2), and the build performed worse than 2021–more unstable framerate, occasional framerate drops for sustained periods of time, and generally worse GPU performance, often running at level 4 rather than 3 or 2, and higher GPU utilization (often in the 90% range rather than in the 70’s where the 2021 version usually runs).
I haven’t tried a 2022.3.1 build yet (ran into some other problems that ate up a few days of time), but at this point I’m questioning whether it makes sense to keep trying to make this work well.
Edit: I did a build in 2022.3.1; it performs better than 2022.3.0, and close to 2021 LTS, but still seems to drop frames more often. In-editor, VR performance remains dreadful.
Edit: The problem is MSAA. 2021 LTS handles it fine, but 2022 LTS can’t handle MSAA in editor play mode with a VR headset active.
Definitely submit a (minimal if possible) bug report. This is a hot topic and there is AFAIK at least one open bug report regarding 2022 performance with Oculus/Android.
Submitted. I didn’t send my project files, but described the issue. I had hoped to include a screenshot showing the framerate in the OVRMetrics HUD, but unfortunately the HUD didn’t show up in the shot.
It doesn’t even have to be a heavy scene, here’s the performance in my main menu scene, with nothing loaded but the VR rig, my skinned mesh hands, and a UI canvas:
I’ve traced the problem to the MSAA setting in the Universal Render Pipeline Asset. In 2021 LTS, I use 4x MSAA as recommended by Oculus. It runs fine in play mode in the editor, and in my stand-alone build. In 2022 LTS, 4x MSAA works in my build, but in the editor play mode it doesn’t (see performance graph in my previous post).
If my headset is turned off, I get over 400 fps in play mode with MSAAx4 enabled. As soon as the VR headset is active, framerate plummets, frame times double, and GPU headroom jumps all over the place.
Edit: I’ve found that I can improve the situation by lowering my Oculus Link resolution. So, to match the performance of the 2021 editor in VR play mode, I must sacrifice either Link resolution or MSAA, although my system is perfectly capable of handling both (as evidenced by the 2021 editor not having this problem).
Note: Lowering Link resolution to Default doesn’t fix the issue completely, but makes it bearable (fps is still not always 72, but hovers in the 60s, and GPU headroom jumps around but stays positive). With MSAA disabled, fps is locked to 72, and GPU headroom is steady at around 88%.
Then they are probably not going to do much. There is already 1 issue on the tracker for this.
But there are multiple causes of performance issues, so to fix them all they need reproduction projects.
This seems more of a VR vs desktop issue than msaa. Or is the performance still high without it?
Also know that VR caps your fps to the hmd max
They don’t need my project, I can reproduce the issue with an empty scene (In a new URP project with an XR rig). Without the VR headset, I press play and get over 400 fps. Running through the headset (in editor play mode), I get 72 fps (as expected, this the framerate Oculus Link is set to), with over 90% GPU headroom. If I turn on 4x MSAA in the render pipeline, suddenly I’m getting wildly variable framerate (30 to 65), and negative GPU headroom.
This isn’t about VR versus desktop, this is strictly about 2022 editor play mode VR performance versus 2021 editor play mode VR performance.
The stand-alone APK built from either version of Unity handles 4x MSAA without issue.
Both 2021 and 2022 editors handle 4x MSAA without issue in play mode without the headset.
Both 2021 and 2022 editors perform the same in the headset (editor VR play mode) without MSAA.
2021 handles 4x MSAA in editor VR play mode without issue (still get 80 to 90% GPU headroom).
2022 does not behave the same way as 2021. With MSAA enabled, it fails to reach 72 fps, and headroom is all over the place (see the comparative performance images I posted above).
I found I can improve the situation by reducing my Oculus Link resolution, so that’s the solution I’m going with for now, rather than having to turn MSAA on and off to work in the editor or compile a build. But there is most definitely an issue in the 2022 LTS editor that tanks play mode performance in VR, and this issue does not exist in 2021 LTS.
My issue got closed as a duplicate of UUM-40249, but that report says that the issue only happens with Screen-Space Ambient Occlusion enabled, which I’m not using. I tried to add a comment to that issue, but I just keep getting errors from the Unity Issue Tracker page.
Edit: just got another email that my issue has been re-opened. (Maybe automatic because I commented on it?)
I have the same issue with Desktop VR (using HTC Vive with SteamVR).
My project runs at a stable 90 FPS in 2021.3.23, upgrading it to 2022.3.0 makes it unusuable in Play mode (FPS can go down to 17 FPS or worse).
It seems to happen when I have both the scene and game views at the same time, but I’m still trying to find a way to reproduce it without sending my entire project.
If you close all inspectors and deselect all objects, and then close the Animation panels and all other panels, console included, so you only have the Game View, there’s some redemption of performance. It shouldn’t be necessary to do this, but it is. The new UI system in the Editor is getting progressively worse in terms of performance, with each “update”.
Separately, the MSAA performance has fluctuated for the entire time I’ve been using Unity, from one major point release to another. Latest releases the worst so far, in the Editor. 2019.1 was probably the best, along with 2018.2
Oddly, Unity never mentions anything about what they’re doing with regards MSAA from one version to another.
Just saw that 2022.3.2 was out, so I tried it, but no improvement. The QA guy who looked at my report said he couldn’t replicate the issue in the empty scene I uploaded, and asked for a shot of my for my profiler window, which I’ve uploaded to the bug report (with and without 4x MSAA):
Small update: QA came back to me with questions about graphics API. I told them I was using OpenGLES3 (building for Android). On a whim I tried switching my platform to Windows, and found that I don’t get the performance problem in the editor under D3D11 with the empty scene.
Unfortunately, when I try running my project with Windows as the target platform, I still get poor performance in the editor in VR (not as bad as OpenGLES3, but still not hitting 72 fps).
You misunderstand the situation (again). The problem is that performance is WORSE when testing on PC than on the Quest 2 under Unity 2022 LTS.
There is NO performance problem with the stand-alone build that runs on the Quest 2. The performance problem happens when the app is running ON THE PC, in editor play mode, in VR via Oculus Link (PCVR software). That problem doesn’t happen with 2021 LTS in the same scenario, just with 2022 LTS.
When the player is set to Android as the target platform (graphics API OpenGLES3), editor play mode in VR is terrible. When I switch the target platform to Windows, the graphics API switches to D3D11, which performs better in editor play mode (in VR, but running on the PC), but still struggles compared to 2021 LTS.
All of this is about how VR runs in editor play mode on the PC, with Unity 2022 LTS struggling to match the performance of Unity 2021 LTS if MSAA is enabled. With MSAA disabled, 2022 runs just like 2021 - without a hitch, which is to be expected, given I’m running the app on a RTX 3080 Ti.
My app is performant on the Quest 2 with MSAA enabled, and shouldn’t have any trouble running on the PC (as evidenced by it performing well on Unity 2021). 2022 LTS runs it at 400 fps without VR active, but has frame timing problems as soon as PCVR mode is active.