[Meta Quest 2] Unknown performance issue

Hello there,

I beg your help after few days of debugging with no reliable solutions founded …
I work on a project in OpenXR (for cross-devices compatibility reasons) in destination of Meta Quest headsets (in a first time, Pico / HTC after). I have serious performances issues on Meta Quest 2 and I don’t found any solutions yet …

On my project I have 2 sequences, one in a outdoor environment, other in interior environment:

  • two are in the same Unity Scene.
  • the interior environment is not visible (Gameobjects hidded) from the exterior environment
  • interior/exterior walls are in the same GameObject but less than 5k vertices (but very tall, it’s a wind turbine body).

In exterior, I have no performance problems, constant 72 FPS with:

  • a directionnal that cast soft shadows with 1 cascade only, and 512px résolution.
  • no additionnal light
  • MSAA x2
  • full baked light on static objects
  • few dynamic GameObjects and Rigidbody
  • less than 100k vertices
  • less than 50 URP batches
  • 2 baked reflections probs
  • multiple light prob group

But, when I enter in my interior environment my framerate just dropped a lot to 30-55 FPS …

  • all exterior objects are hidded when I enter in interior environment
  • the directionnal light are hidded (no windows)
  • Only one Point light is present at same time …
  • less than 70k vertices
  • less than 35 drawcalls…
  • less than 10 dynamic objects
  • No Depth texture

I really don’t know why I have this framerate drop on my Meta Quest 2 …

When I try to watch CPU Profiler on development build, it seems to wait frame from GPU. I tryed to debug GPU with Render Doc (to profile Vulkan cmd and timing …), I mesure 1000µs Render time, but I have 36FPS (27ms) and in OVR Monitor the GPU is arround 90-98% of usage … I really don’t understand where is the bottlenek or how to find why the performance is so bad or which solutions I can explore… I use 2023.3.41f1 of Unity and Vulkan API (same performance issue constated on OpenGL).

I try the same app on Meta Quest 3 and I have a constant 72 FPS with less than 80% GPU usage in the wrost case (with much better Quality settings, shadow cast on additionnal lights, post process with bloom effects, distance shadow maps, 4x MSAA …).

if you have any idea to help me …
Thanks you in advance !

There is on attached files, my URP and quality settings for meta quest 2.




Player settings > Other settings (Android)

Does the Unity Profiler work while running on the Quest? I’m asking because it’ll be the first thing I’d use to narrow down any issues but it may not be compatible with VR headsets.

I’d definitely try with postprocessing disabled because certain fx can heavily tax those mobile GPUs. If the performance is great after disabling post fx you should disable or tweak individual post fx.

As to settings that could speed up rendering I’d enable graphics jobs and incremental GC in Player Settings, these are likely to provide the most performance boost with a single click (but may also lead to issues or only marginal gains).

Yep!
The profiler does work in dev builds as it is just an Android device.

Just check dev build and autoconnect profiler and check where the performance goes. If you can’t find it, using deep profiling might help a lot as well.

yep the profiler work on developper releases, I mention it in my post btw, it’s the first thing a used to debug my app, I see with it (and frame debugger) that my draw calls and vertex count is low, but profiler can’t profile GPU in Vulkan builds on Meta Quest.

I see in profiler that the CPU waiting for frame, but when I profile GPU with RenderDoc, I don’t see a vulkan command who take significative amount of time to be considered. My vertex count is low (< 100 k), and my setPass calls too (<40), no shadow casting… So I don’t know where I can look that show the bottleneck in my render that result to 24-50 FPS framerate with a geometry less complicated than my exterior environment where I have 72 FPS …

GPU profiling is not used much by me either way.
Deep profiling gives me quite some info in the render pipeline however. I have found many performance issues here.

I use OVRMetrics to see the GPU load in my app, and then have a button which goes through settings one by one until I find the setting that fixes the issue. You can also see if maybe you are using too much memory here.
Make sure that the right quality tier is selected for android (green checkmark is required at that tier! Not just disabling the others)

Start barebones if you think it’s settings. Disable post processing, disable the outline feature, disable additional lights, and more.
Optimizing mesh data in the player settings might have a small benefit as well