Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Vulkan for Oculus Quest

Discussion in 'AR/VR (XR) Discussion' started by Claytonious, Sep 2, 2019.

  1. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    I am looking forward that final release of 2019.3. Which date will be unleash this release?
    Will this version have support for VFXgraph on Oculus Quest?
     
    ROBYER1 likes this.
  2. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    Last edited: Jan 28, 2020
  3. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    I just tried VFXgraph (Unity 2019.3.0f6) with a S7 and an oculus Quest and it has glitches in both, not working fine for me
     
    Bovine and ROBYER1 like this.
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,446
  5. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    161
    Completely unusable? Also is this main render pipeline or URP and regardless of which, how's the performance or is it so unusable as to not be possible to tell?
     
  6. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    VFX graph only works with Vulkan but I can not make it work at all.

    in Quest we see problems with multi-view with right eye having a black screen and also it force you to use new XR plugin management which is unusable yet too.

    I just hope they don't stay another year to fix all this and they communicate better when we can expect to have Vulkan on android, we have deadlines and we are force to stick with OpenGL and not use VFX graph ;(

    Someone from Unity team can stand up and say something regarding this?

    Thank you ;)
     
  7. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I can't even get Vulkan to run on Quest using the normal SRP API or even the RenderPass API which is supposed to be made for use with Vulkan. Does the URP actually run on Vulkan for Quest?
     
    TashaSkyUpchurch and ROBYER1 like this.
  8. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I managed to get it working but I have a strange issue. When I set it to multiview it runs fine but reports that it's running in multipass mode, but setting it to multipass makes it run in multipass yet the right eye is black?

    I have got FFR working by using the OVRManager.fixedFoveatedRenderingLevel setting in script to assign it and it seems to work fine.
     
    Last edited: Feb 3, 2020
  9. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    334
    Vulkan is now enabled on Oculus Quest using Fixed Foveated Rendering (FFR) in 2019.3, and is currently an experimental release where we intend on gathering feedback from the community regarding its performance in real world situations. This feature is only available through the plugin framework using the Oculus XR Plugin and not available through the deprecated built-in XR pathway. The feature is also only supported for a limited set of configurations. Currently, the feature only works with the built-in rendering pipeline (using multipass with post processing disabled) but will soon work with URP when URP 7.2.0 is released.

    We'll make sure our documentation is more explicit about the scope of this feature, including the 2019.3 platform updates web page.
     
    WonkeeKim likes this.
  10. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,446
    Is there any update on how to activate the FFR (Fixed Foveated Rendering) with it using the Oculus XR Plugin in the new XR Plugin architecture? We have noticed that the logcat logs mention the following line on the Vulkan FFR density map when using Oculus XR Plugin on its own (without any Oculus Integration Assets from the asset store)

    Vulkan FFR is supported, with density map size 32x32


    There is also no documentation on FFR here at all: https://docs.unity3d.com/Packages/com.unity.xr.oculus@1.1/manual/index.html

    My reason for asking about using it with the Oculus XR Plugin is to ensure we do not end up using any deprecated plugin assets from the asset store and purely make use of the Unity.XR.Oculus utils from here instead to set it via code:
    https://docs.unity3d.com/Packages/com.unity.xr.oculus@1.0/api/Unity.XR.Oculus.Utils.html

    I have reported the following bugs with Vulkan on built-in renderer and URP 8.0 off the current master branch - if it is broken on the latest master branch then it will be broken in the next release:
    (Case 1215378) [XR][Vulkan][URP][Multiview] Left eye is rendered grey while the right eye is black
    (Case 1215369) Vulkan on Oculus Quest using Built-In Renderer shows both eyes on left eye and distorted. Right eye renders black
     
  11. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    Is the Oculus Integration Assets getting deprecated? I was under the impression that it was still to be used for configuring the devices since it can handle stuff like setting GPU/CPU levels and what-have-you whereas the new plugin does nothing like that (according to the docs).

    I reckon I'm going to stick with OpenGL since Vulkan has issues on my end like an MSAA running real bad (2x adds 4ms, 4x adds 8ms) and since the RenderPass API is not ready for XR yet you can't really take advantage of Vulkan anyway.
     
  12. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    Hello guys, I'm having a hard time with making Vulkan work with my Quest app. When bulding and running it, it simply crashes at startup (it didn't when using OpenGL). I disabled the legaxy xr settings, downloaded the Oculus XR Pluginin and added "Oculus Loader" in the Plugin Providers slot (XR Plugin Management). I commented out the code part which prevented Unity to make the build on Vulkan as well.
    Now, I guess that I'm missing this FFR stuff. I would appreciate if you could disclose something more about the steps you've taken in order to edit the "OVRManager.fixedFoveatedRenderingLevel" setting. Thank you :)
     
  13. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,446
    Funny you should ask, I just got a response on it today:


    there are three ways that you can set the foveation level (in order of goodness):
    • Through our XR Plugin for Oculus, there's a new API function
      Code (CSharp):
      1. Unity.XR.Oculus.Utils.SetFoveationLevel(level)
    • Specifying the level using adb to set a debug property,
      Code (shell):
      1. adb shell setprop debug.oculus.foveation.level <level>
    • Oculus' OVRManager asset package which provides functions for managing the appropriate levels. Details can be found in the Oculus developer pages (for example, here) and other Oculus developer blogs.
    Foveation has five levels from zero (0) which disables the feature, to four (4) which maximizes the rasterization control (see here for details).
     
    vincespeed likes this.
  14. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    Thank you very very much for helping! I tried the way 1... but there's no "SetFoveationLevel" in my Unity.XR.Oculus.Utils =\ Am I missing something?
     
  15. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    Code (CSharp):
    1.  if (OVRManager.fixedFoveatedRenderingSupported)
    2.             OVRManager.fixedFoveatedRenderingLevel = FFR;
    Is what I am using and it seems to work on Vulkan. Not sure how stable it is though if using the plugin is recommended now.
     
  16. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,446
    I haven't tested it yet, try using the latest preview package for it, otherwise it has not actually been released yet but should be very soon!
     
  17. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    I gave up on it, I'm switching back my project to OpenGl. I tried Dragnipurake97's solution to no avail. Hope they'll sort stuff out.
    Thanks to both of you for your help anyway, guys :D
     
  18. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    It doesn't work in editor for me but does for builds on Quest if that was your issue.

    I am also using a custom SRP that is basically a stripped down version of the URP so the intermediate texture the URP uses may cause some issues.
     
  19. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    No, I may be missing something somewhere. In the editor the project runs fine, but when I deploy to Oculus the 3 loading dots appear, but the app crashes before even the Unity splashscreen. I tried debugging with adb but no useful informations are given about the crash. I really have no clue about this issue.
     
  20. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I had that but I fixed it by deselecting "Initialise On Startup" in the XR Loader Settings, equipping the Oculus Loader, then re-selecting "Initialise On Startup".
     
  21. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    Just tried that too, but it didnt solve the problem :( The most frustrating part is, when opening XrPlugin Management, it keeps "forgetting" what's installed. And I have to reinstall Input helpers again...
     
  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'd advise just sticking with what works, it'll unblock you and you can revisit periodically. Otherwise it's a soul-destroying trial and error situation which is illogical to pursue IMHO. If Unity wants to change that then they should engineer changes for that.

    It's not the customer's responsibility to guess at how to make it even work.
     
  23. vincespeed

    vincespeed

    Joined:
    Mar 8, 2014
    Posts:
    70
    Wise words, wise words... I definetely gave up and switched back to a working configuration.
     
  24. OLGV

    OLGV

    Joined:
    Oct 4, 2012
    Posts:
    55
    Did anyone try this with the latest 2019.3.1f1?
     
  25. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I have tried it in 2019.3.3f1 and got Vulkan with multiview working seemingly fine.
     
    Claytonious likes this.
  26. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    31
    Hi. Im hardly trying this too. Im using URP, XR Management with XR Oculus and Unity 2019.3.3f1 and i got double sight with MultiView so the stereoeffect is messed. What i missed? MultiPass worked as usual
     
  27. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I'm using a custom SRP but should work the same for URP since they use the same API. I am using:
    - Unity 2019.3.3f1
    - Latest XR Plugin with Oculus Loader
    - Vulkan API
     
  28. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    31
    I've the same. But still have double sight in MultiView and Vulkan. It only works with GLES, but then no FFR. I get mad :)
     
  29. mura_vrs

    mura_vrs

    Joined:
    Jan 22, 2019
    Posts:
    11
    Have you found a working solution for this? I'm still having the same issue.
     
  30. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Saw this in the 2019.3.14 changelog:

    Code (CSharp):
    1. XR: Fixes a perf issue when using vulkan and xr sdk. results in a perf gain of ~4 ms on the GPU. (1206999)
    Anyone try this for the Quest? The last time I tried Vulkan with the Legacy RP on 2019.3, the performance was much worse than OpenGL, and my game crashed because of the greatly increased memory usage (which was warned about in the patch notes).
     
  31. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,446
    DanjelRicci and GridWanderer like this.
  32. matthoadrobson

    matthoadrobson

    Joined:
    Dec 30, 2017
    Posts:
    10
    Did this get resolved into a stable build? Anyone got Vulkan working with URP?
     
  33. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    228
    Anyone out there tried Vulkan on Oculus Quest 2 with Unity 2021?
     
  34. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    161
    Working okay so far on alphas cannot speak for the LTS. It wasn't working at all previously.
     
  35. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,446
    Have you?
     
  36. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    228
    No, which is why I'm asking here instead of creating a new thread. I just know that adding a new Graphics API can take hours to process all assets in a project, plus I'm getting a little bit tired of being a beta-tester for Unity (for features that are pushed as production-ready). If you Google for Vulkan, Quest and Unity, it seems like every tech-blog was already talking about Vulkan support for Oculus Quest being added back in 2020 - yet this thread is another example of "yes you can add it, but no don't expect it to actually work". So before I go down that rabbit hole of converting my project just to test it out if it's stable, I would like to ask the community what their experiences are :)
     
    Last edited: Feb 25, 2022
  37. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    161
    Do a sanity light project. Even if people say it's working for them, you won't know until you try it. Also. Push to git, tag, change to vulkan and do a build so you can see for yourself.
     
    ROBYER1 likes this.
  38. JustinAHS

    JustinAHS

    Joined:
    Feb 18, 2013
    Posts:
    33
    I just tried it on Unity 2020.3.28f1.

    Added Vulkan to Player settings, waited hours for asset refresh, drag-dropped Vulkan to be top of list, built for Quest 2, tested it.

    The result was that I ended up seeing double of everything because multiview probably isn't supported. Went back to OpenGLES3
     
    Last edited: Mar 18, 2022
  39. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    848
    I am running Vulcan on the Quest 2 with Unity 2021.2.16. But not sure how stable it is just yet. The Editor itself is still stuck in DX11. If i change it to Vulcan I get this:
    "D3D11 is currently the only graphics API compatible with the Oculus XR Plugin on desktop platforms. Please change the preferred Graphics API setting in Player Settings.
     
  40. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    848
    Som observations. Vulcan glitched badly with 8xMSAA, ES3 did not. Vulcan does not support groupshared memory in ComputeShaders, ES3 does.

    Back to ES3 then.

    The above seemed to work equally well with ES3, ES3.1 and ES3.2, so I left it at ES3.2 for now.