Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unity VR- Compatible Graphic APIs

Discussion in 'VR' started by milosbogdan262, May 28, 2023.

  1. milosbogdan262

    milosbogdan262

    Joined:
    Jan 7, 2022
    Posts:
    1
    I am trying to make a VR game in unity but the only API that works as intended is Direct3D. If I use OpenGL or Vulkan and hit play, the game only shows on screen in the editor window but doesn't pop up in VR. Does anyone have a solution for this so that I can render the scene in openGL? I am running version 2021.3.23f1 and using a meta quest 2 linked to my pc
     
  2. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    On Windows, DX11 is the only supported graphics API for Oculus/Meta. The Editor uses the Windows settings for graphics api, but if you build for Android and deploy the application to your device, both OpenGL and Vulkan are valid graphics API options.
     
    DevDunk likes this.
  3. cmembrez

    cmembrez

    Joined:
    Jul 10, 2023
    Posts:
    5
    In some future, any chance that we can build on Windows platform using Vulkan graphics API? in the context of Oculus/Meta (Meta Quest 3, Meta XR packages) and with the idea to use the computer power of PC itself and not the headset.

    Or is there a reason why a Windows build with Vulkan is not possible? My apologies if I am missing something obvious. Let me know of any helpful links. So far, I tried to find info around the Unity Issue Tracker, AR/VR Roadmap of Unity, this forum, github, google.

    background / context for my question: I want to use the passthrough + occlusion with Meta Quest 3 (using package: https://github.com/oculus-samples/Unity-DepthAPI that requires Vulkan) while using the computer power of my PC. Because of the use of large FBX model within my scene. I know my next steps could also be to use optimized and smaller FBX models :).
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,969
    If PCVR can use vulkan with the oculus xr plugin, that does NOT mean you can use features made for standalone VR on PC!
    Stuff like depth and occlusion require vulkan on android.
    Dx11 could work as well, but meta's focus is on standalone. AR passthrough on PCVR is a developer only feature.
    DX11 is a requirement from meta I think. I have gotten dx12 to work with OpenXR (at least im HDRP)

    You'd need something like the hololens, Varjo XR3, and maybe Lynx R1 (not sure!) To do proper PCVR MR
     
    cmembrez likes this.