Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Discussion 2020.3-2023.3 URP standalone VR performance

Discussion in 'VR' started by DevDunk, Sep 3, 2023.

  1. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,224
    I just finished some extensive testing on standalone VR performance and came to a surprising conclusion.
    Right now performance is very similar across all Unity versions. The scene contained quite some tris, but a low amount of materials/draw calls (see screenshot below). Most measurements were within the margin of error.

    2020 had slightly better GPU utilization with just opaque materials without any lighting, but as soon as lights and shadows were added 2022.3 and 2023.3 seemed to perform better.

    OculusXR is faster than OpenXR (probably due to tech like phase sync, symmetric Projection, and buffer discards). OculusXR did report higher CPU levels, but similar usage. Not sure what to conclude there.

    OpenGLES3 is similar to Vulkan.

    This means that the base rendering is similar performance-wise, so if you encounter a performance degradation you really need to dig into the URP settings and project settings, reimport packages, and if after that performance still is poor I suggest making a bug report for it.
    I probably won't be doing more tests like this unless I walk into a big performance issue.

    Results: VR URP Benchmarks.xlsx
    upload_2023-9-3_11-40-29.png

    upload_2023-9-3_11-40-45.png
    upload_2023-9-3_11-40-10.png
     
    FunSTW, PadelVR, Shizola and 2 others like this.
  2. Slin

    Slin

    Joined:
    Jun 27, 2010
    Posts:
    85
    The GPU and CPU utilisation is dependent on the level it is running at. 100% utilisation at level 1 may only be 20% utilisation on level 5. So unless you set it to the same level in all your tests, you can't just compare the utilisation.
    Based on your numbers, performance in the first two test cases has significantly improved in the newer versions.
    It would be interesting to compare those cases with opengles. This also shows that in the last two cases something happened after 2020 that made CPU performance much worse with the OculusXR plugin.
     
    DevDunk likes this.
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,224
    True. I just tested 'out of the box' performance without managing power levels.
    In the past it was very hard to get anywhere near this performance in 2022/2023, so now it's a lot better.
    The CPU level was a bit of a weird find indeed. I'll make a bug report about it and see what they say
     
  4. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    82
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,224
    NickMarmaras and nukadelic like this.
  6. airoll

    airoll

    Joined:
    Jan 12, 2021
    Posts:
    37
    Thanks for running your analysis!
     
    DevDunk likes this.
  7. Liam-C

    Liam-C

    Joined:
    Mar 6, 2017
    Posts:
    18
    Really appreciate you running these performance tests (and all the bug reports you submit and share around, etc). But as Slin said, with variable GPU/CPU level these results aren't really valid. The clock frequency differs massively with each level, so the utilization values aren't comparable when using a different level. The results also don't mention foveation level, so if dynamic foveation is enabled by default the GPU results will be skewed too.

    In this profiling guide, Oculus recommends locking the GPU and CPU levels to 4, disabling dynamic foveation and setting foveation level to 0 via the adb when profiling. See the bottom of this doc for the commands:
    https://developer.oculus.com/documentation/unity/po-per-frame-gpu/
     
    DevDunk likes this.
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,224
    OpenXR doesn't utilise foveation as far as I know.
    I should have locked the cpu and gpu levels indeed, but 2022 and 2023 getting the same performance with lower gpu levels sounds like a win to me
     
    PadelVR likes this.
  9. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,224