I noticed that performance on Vulkan sucked on the Quest 2, even on Unity 2021.2. In the end I did fix the issue and it gave me a 30-60% performance boost and a lot better RAM usage!
The issue:
Oculus XR plugin defaults to 1.10.0
The fix:
Push to the latest 2.0 (2020.3) or 3.0 (2021.2) version
How to:
Go to your project’s root folder (where you stored your project)
To:
“com.unity.xr.management”: “4.2.0”,
“com.unity.xr.oculus”: “3.0.0-pre.1”, (or 2.0.0-preview.1)
This way you use the latest version and also gain the ability to use Late Latching for better latency
( and in the future SpaceWarp, which you currently need a modded URP for in Unity 2020.3: GitHub - Oculus-VR/Unity-Graphics at 2020.3/oculus-app-spacewarp )
Future is here already. You need 2020.3.21 or newer 2020.3 version, those SRP packages from oculus branch, 2.0 preview for OculusXR and Oculus v34 integration package from asset store. After you have these in the project, install Oculus version of OpenXR from oculus tools menu and use OVRManager.SetSpaceWarp(true); on your scripts to turn it on in the build.
For debugging this, latest OVR Metrics Tool for Quests already supports AppSW.
As a side note, on my brief testing with 2020.3, 2021.2 and 2022.1 for Quest 2 builds, 2020.3 alone even before App SpaceWarp feels tad faster than what we have on the newer engine versions URPs.
I have done everything you said and added ovrmanager.setspacewarp(true) on the Start function. There seems to be no fps change with it set to true or false?
I followed your instructions, installed, modded what needed to be and put OVRManager.SetSpaceWarp(true); at every scene’s awakening. It seems to be working well in a build on the Quest 2, although it is about 10/15fps slower than before. But in the editor, in play mode, the headset stays at its original position and does not follow the movements of the real one.
There is also a Debug.Log from the OVRManager that I never got:
[OVRManager] mainCamera found for MRC:
UnityEngine.Debug:LogFormat (string,object[])
OVRManager:FindMainCamera () (at Assets/Oculus/VR/Scripts/OVRManager.cs:2040)
OVRManager:SetSpaceWarp (bool) (at Assets/Oculus/VR/Scripts/OVRManager.cs:1159)
LaunchSpaceWarp:Awake () (at Assets/Scripts/LaunchSpaceWarp.cs:8)
It worked well prior to the changes to integrate SpaceWarp.
I used:
Unity 2020.3.22f1
Modded SRP 10.7.0: com.unity.render-pipelines.core; com.unity.render-pipelines.universal; com.unity.shadergraph
Oculus Integration 34
Oculus XR Plugin 2.0.0-preview.1
XR Plugin Management 4.2.0
Would this be an issue with Vulkan ? Or is it way more likely that the preview packages messed things ?
But that is my issue, Unity detects the headset but does not play in it, game view looks as if there is not headset connected and the camera stays on the ground. And when using an ASW build on Quest 1, after about 20s the camera gets stuck, showing always the same view and giving a wonderful motion sickness moment.
I will try to change the experimental features that come with Vulkan to see if it stops messing on the Quest 1.
I just found out that one cannot use the Subsampled Layout option with Quest 1 (as it is written in the options duh). But still, after a few seconds the camera gets stuck between 2 frames and alternates quickly between them. The only options checked under “XR Plug-in Management > Oculus” are “Target Devices: Quest” and “Experimental: Application SpaceWarp (Vulkan)”. This behaviour does not appear on the Quest 2.
For me the new Oculus XR 2.0.0 break playing in editor. It only work on Quest.
I have to go back to 1.11.0 to make the editor work again.
Also the Custom URP package break shader and vfx graph view. Really don’t move to this version except if you really want to add AppSW, it’s not ready yet.
You sure you cloned the custom SRP packages with Git LFS? and you got ALL three packages, core, universal and shadergraph from it? You need all three for this.
made sure the lfs was working by inspecting some dll such as com.unity.render-pipelines.core\Editor\ShaderGenerator\ICSharpCode.NRefactory.dll (it should be >500kb and not just 1kb)
copy the core, universal, and shadergraph folders into the new project’s Packages folder
open the project with unity
create > Shader > URP > Lit Shader Graph
create some nodes
console produces errors, e.g.
Shader error in ‘hidden/preview/UV_4a2305d9640541b386be037a015d0e3d’: ‘GetPrevObjectToWorldMatrix’: function must return a value at Packages/com.unity.render-pipelines.core/ShaderLibrary/SpaceTransforms.hlsl(18) (on d3d11)
Shader error in ‘hidden/preview/UV_4a2305d9640541b386be037a015d0e3d’: undeclared identifier ‘UNITY_MATRIX_PREV_M’ at Packages/com.unity.render-pipelines.core/ShaderLibrary/SpaceTransforms.hlsl(18) (on d3d11)
some additional warnings I do not understand
some asmdef has missing references (just showing two, there are more that missing). not sure if this is relevant or important.
This is the first time in 10+ years that I have not been able to put any technology into operation in unity. I’m not a programmer, but so far I’ve managed to download, set up and try everything from github - but I’m completely clueless here. I hope that SpaceWarp will get to the official URP as soon as possible - which I will download in some way that I can handle …