Hey guys - I’m pretty new to using URP with VR and would like some information/opinions on my settings to see if I can resolve the performance issues I am getting.
Here’s a few quick details:
Unity version 2020.3.10f1
Target platform is Quest 2
Prior to using URP the standard pipeline was in use and 60+ FPS was constant without issues
Using reflection probes (baked), global volume, mixed lighting (mostly baked), baked occlusion culling
I have tried many solutions to try and increase performance, but nothing really seems to improve. I’ve disabled global volume altogether, disabled the reflection probe, reduced shadow quality, lightmap resolution and compression, and even still the best I get is around 28 FPS, with GPU utilization at a continuous 100%. Clearly there’s something in my settings that is having a huge impact, but I can’t seem to pinpoint it out.
Please check out my settings below, and a screenshot of the profiler at the end. Any help is much appreciated!
I would love to but every time I attempt to profile using my Quest 2, Unity keeps telling me the device is disconnected, despite the fact that it’s running fine through the headset.
Turn off all post processing on the camera and delete the volume, I can’t imagine your Standard rendering tests would get 60 fps with a post processing stack with all those effects. PP and VR on Quest2 is almost impossible to get to 72 fps when rendering more than a few cubes.
I can see you are using post processing in vr which will suck up your performance. Every of the post processing override will consume a high render time. Remove your post processing and try to build one more time.
**If you are getting urp 30fps frame capped issue.
Then add this thing on start.
-Application.targetframerate = 90
-set the vsync count to 0.
Special note: getting good graphics and good frame rate in VR is a very tricky part. If you use post processing even in built in pipeline your frame rate will also suffer.
I think the issue is URP itself. It just doesn’t seem to work as well as it should for VR/AR.
I’ve been fighting with performance on the Quest 2 with URP for the past few weeks. Even with a simple scene (1500 duplicate objects each with 12 vertices), with no post processing, and no scripts running (other than the xr rig) and I couldn’t get above 55fps and the GPU Voltage was constantly spiked at 99%. I tried dynamic batching, gpu instancing, the SRP batcher, static batching (switched the 1500 objects to static and this somehow performed the worst of all of them), and the targetframerate/vsync settings mentioned above with no luck. I then tried mesh combining. While it did drop my draw calls from 21 to 7, the framerate still hovered in the 50s.
This past weekend I tried something a little more drastic and ripped URP out of the project going back to Built-In. I switched my 1 shared material back to the standard shader and enabled gpu instancing. Then I set up the quality settings to enable realtime shadows and 4x MSAA. (no post processing though)
Created a new build with the same scene and got a rock solid 72fps. Not even a flicker of less than 72 in the OVR Metrics overlay.
This is just my experience with URP, but I’m going to stick with the built-in RP for now and maybe give URP another shot in a year or so.
Seems like there are some settings wrong.
You could check out this project (there is a 2021 lts branch) to check them: https://github.com/smitdylan2001/ApplicationSpaceWarp
It does use a custom oculus URP version, so keep that in mind
@aVaKus No luck with this? I’m also having a crazy CPU bottleneck on the main thread in URP in a super tiny scene. Profiler tells me I’m having 80 ms of scripts which are just URP scripts.
Sorry “only” 14 ms for a render pipeline loop with 60 batches which are all default urp shader. I assume it’s not related to GPU at all because 2 million tris or 22k tris don’t change timing at all, there’s no wait for present at all and render thread is just waiting for main thread all the time.
It’s not reaching any target fps or vsync. Unity 2021.3.10 OpenGLES3, Quest 2. Vulkan is even slower than that.
It does seem very strange that controller update script is also taking so long
@Genebris I actually did have some luck with URP. After a few weeks with the built-in pipeline I was reminded what a pain render queues can be so I decided to give URP another try.
I reinstalled URP in my project and created a default URP pipeline asset and URP renderer asset and when running the project I still had the same performance issues.
So I started digging and I found a random post from August (I think it was on Reddit) where someone mentioned how URPs depth texture mode setting was changed from force prepass to something else (can’t remember off the top of my head) but that it was supposed to switched back in a future release. I looked at the URP renderer asset and there is now an option to set the default texture mode manually, so I set it to ‘force prepass’.
This helped somewhat, but performance still wasn’t the same as built-in. I continued messing with settings and I disabled the SRP batcher, enabled dynamic batching, and enabled gpu instancing on my materials and mesh particle systems. This seemed to do the trick for me. My builds now run at a constant 72fps on the Quest 2. I tried some stress tests and things held strong at what I’d consider a heavy load.
I also tried using the 120hz mode, but this was too much for it. I’ll try 90hz in the future, but for now 72 meets my needs.
We’re using 2019.4 with URP and tried upgrading to 2020, 2021 and 2022 and never got the same performance as what we get in 2019. Maybe there are specific versions of these that work better than others (I think Oculus recommends 2020.3, I think) but we don’t have time to test them all.
On top of testing the different versions of Unity, you also have to test the different versions of URP.
I’m not sure which versions you’re using but if you have access to “Mixed Lighting” and “Light Layers” in the URP asset try disabling those, I found a big performance gain when I disabled them.
Been watching this issue and the fix is now in review for Unity versions 2021.3.X, 2022.1.23f1, 2022.2.0b15, and 2023.1.X. Before it was just for 2023.1. I hope we have the fix soon.