Search Unity

Oculus Quest under 2019.3.0f6 with Vulkan - Cross-Eye Distortion

Discussion in 'AR/VR (XR) Discussion' started by Claytonious, Jan 29, 2020.

  1. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    Now that 2019.3 is released (apparently with Vulkan support for VR according to the release notes, even though there are no docs about it), I finally built to device with Vulkan as the graphics API from a project that was healthy under OpenGL ES 3.

    According to logcat, it *does* appear that Vulkan is being used, and it does appear that fixed foveated rendering is probably being used (at least the log indicates that FFR was found to be available, so I hope Unity is choosing to use it?) The interesting output from logcat about that is:

    Vulkan FFR is supported, with density map size 32x32


    However, the absolute show-stopper is that eyes are rendering in the wrong positions: the left eye is rendering as if it is slightly to the right of the right eye (it might even simply be that the eyes are swapped - hard to tell from this initial test). This is a deeply cross-eyed horrible thing to see in the HMD of course.

    Otherwise, everything "just worked", so this is an exciting step forward. Even though the game was unplayable due to being cross-eyed, performance was excellent.

    Perhaps I need to configure something differently to make the eye matrices correct for the Oculus Quest while using Vulkan?

    This project is from Unity 2019.3.0f6, with no Oculus plugins from Oculus present anymore, using only the new XR Management Package (with the Oculus Loader installed from that).

    This worked fine from Unity 2019.3.0f3 with OpenGL ES 3 (and might still work fine now with OpenGL ES 3 for all I know) - but now that it's from f6 with Vulkan, the cross-eyed problem has appeared.

    I'm going to try a bare-bones vanilla "Hello World" app using Vulkan now to see if this stuff ever works on Quest, but any tips would be appreciated.
     
    Last edited: Jan 29, 2020
  2. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    Well, creating a brand new "Hello World" for Oculus Quest from Unity 2019.3.0f6 with Vulkan graphics API just results in an app that never launches on the device: it just spams this message to logcat while on the black loading screen and the game never loads:

    E vulkan  : dequeueBuffer returned unrecognized buffer


    So I guess I'm lucky the real project ran at all.

    I submitted this new bare bones project as a bug report.

    Demoralizing, really...
     
  3. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    What's the case number?

    There is still no documentation on how to enable or programmatically set the FFR Vulkan Density map which I also find shocking. Does anyone know how to?
    @Matt_D_work @StayTalm_Unity @mfuad

    These features shouldn't be announced on release without documentation or even a simple reference.:(
     
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I'm just going to leave this here, what I currently see.. reported at Case 1215369
    doubleup.png
     
    Last edited: Jan 29, 2020
  5. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    This was a config error on my part - though I had the Oculus Loader installed via XR Management, I did not have it included in the list of plugins in the XR Management inspector. (Spewing this weird error instead of telling me I had no loaders in the list was not helpful).

    With this fixed, I can now verify that a simple "Hello World" project under 2019.3.0f6 with XR Management/Oculus Loader and URP:

    * Works fine with OpenGL ES 3
    * Is unusable with Vulkan due to the right eye being badly distorted

    I submitted this as a new bug report of its own which includes the very simple "Hello World" project. I will open a new forum thread that is focused only on this simple repro without the other noise I created in here.
     
    Deleted User, ROBYER1 and fherbst like this.
  6. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Got your answers :)

    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).
     
    gjf and Claytonious like this.