Search Unity

Fixed foveated rendering on Oculus Quest not working

Discussion in 'AR/VR (XR) Discussion' started by AmbOcclusion, May 29, 2019.

  1. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    Surely not, I'm already using 8.0.0 from here https://github.com/Unity-Technologies/ScriptableRenderPipeline/commits/master
     
    saifshk17 likes this.
  2. daves

    daves

    Unity Technologies

    Joined:
    Oct 18, 2018
    Posts:
    16
    No. SRP 7.2.0 doesn't require upgrading the Unity Editor; it's purely package work. You should be able to just upgrade.
     
    equalsequals likes this.
  3. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    I am concluding the saga of this forum post with the final response from the Unity Graphics Team detailing how to actually use FFR with Vulkan through the Oculus XR Plugin here


    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).
     
    Dragnipurake97, Claytonious and mgear like this.
  4. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    132
  5. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    gjf likes this.
  6. daves

    daves

    Unity Technologies

    Joined:
    Oct 18, 2018
    Posts:
    16
    @equalsequals I've successfully used 8.0.0 with 2019.3.0f6, so no worries there.

    Also, please stick with 2019.3 for the time being. There are some architectural changes (specifically dealing with Vulkan render passes) in the engine in 2020.1 that have are currently affecting all the goodies you want: Vulkan, multiview, and FFR on Quest. Please hang with us for the moment, and I'll let you know when to start kicking the tires on 2020.
     
    ArchVizPRO, equalsequals and ROBYER1 like this.
  7. daves

    daves

    Unity Technologies

    Joined:
    Oct 18, 2018
    Posts:
    16
    @ROBYER1 and everybody else: With regards to the foveation post, using the XR Plugin for Oculus method is totally what you want to use in production.

    I mentioned the adb version as a reliable backup, but that's a setting that exists on the headset until it's rebooted, and is really only there for testing. The last method (OVRManager) is being replaced by the XR Plugin method.

    I'm just a completist (it's a genetic thing o_O), which is why there's the extra detail.
     
    gjf and ArchVizPRO like this.
  8. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    Do those architectural changes mean that the RenderPass API will be ready for XR in 2020.1?
     
  9. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    132
    Thanks. We're in no rush to move to 2020. I'll look into the 8.x packages and see if everything still works.
     
    ROBYER1 likes this.
  10. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    I was thinking 2020 was already features ahead of 2019.3. Lucky I can sit tight on 2020 until the Vulkan Multiview work is done. Thankyou for the heads up and I look forward to hearing when 2020 alpha/beta has the Vulkan Multiview working for Quest as you intended.

    Thankyou for your hard work and for the transparent responses here. They are really appreciated!
     
    daves and saifshk17 like this.
  11. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    666
    So just to be perfectly clear (and thank you so much for the clarity!) is this what we're saying the final state of things is for now?

    Vulkan on the Quest in 2019.3xxx will be marooned on Multipass and will be kind of an alpha, but we are welcome to help test Vulkan in that mode if we like. But to get Multiview (which many if not most of us will need to actually ship with) we will need to wait until some future 2020.xxx release? Is that correct? I am not editorializing either way or trying to load these questions - I only seek to know what's happening for planning purposes.

    Thanks for the added info so far!

    EDIT: Answered over here already - thanks!
     
    Last edited: Feb 5, 2020
    Dragnipurake97 and gjf like this.
  12. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    259
    Last edited: Feb 11, 2020
    fherbst likes this.
  13. arnav9893

    arnav9893

    Joined:
    Feb 13, 2020
    Posts:
    1
    I was also getting "isTargetTexture2DArray" and "renderingData.killAlphaInFinalBlit" as true, so I went with the nuclear "return false;" option. One thing to note is that I believe this workaround will disable the ability to cast the content to a mobile device or Chromecast, though I can't verify this.
     
  14. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
  15. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    Last edited: Feb 21, 2020
  16. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    666
    Which PR? Do you have a link?
     
  17. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    Think the link got removed? idk it's there now
     
    Claytonious likes this.
  18. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    Is FFR working for you alongside render features? I want to use a decals renderer for URP but that produces an additional pass when rendering which will probably affect FFR from what I understand!
     
  19. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    25
    Hi Everyone. Just tried 2020.1 Alpha with URP 8.0.1, VULKAN API Only, XR Oculus 1.2.0 Oculus Integration 14 with Multiview. Still no success. Rendering weird on Eyes. Even more worse than in 2019.3 on URP 7.2.0. Had to fall back top GLES again. I really want to use FFR. Is there any Chance to get it to work on GLES? Or when we can use VULKAN, FFR, MSAA and URP?
     
  20. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    To get FFR working you can render straight to the camera backbuffer by using a hack in URP to avoid rendering to the intermediate texture.
     
    ROBYER1 likes this.
  21. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    25
    Hi. So there is no way to have it all right now without hack? You mean FFR by using GLES? So do you think i should get rid of VULKAN and use GLES? I'm very confused. Some people wrote they successful tested VULKAN, FFR, MULTIVIEW and MSAA with latest Unity and URP. So i really don't understand what i do wrong?
     
    ROBYER1 likes this.
  22. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I got FFR working on both GLES and Vulkan by using a custom SRP which only renders straight to the camera buffer, but you can skip it on the URP by returning out of a function early which you should be able to find on a thread like this somewhere.
     
  23. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    Vulkan is not supported in 2020.1 or .2 yet due to vulkan driver errors Unity are looking into
     
  24. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    FFR only works with this hack, it is coming to URP *slowly*
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/6036
     
  25. Dragnipurake97

    Dragnipurake97

    Joined:
    Sep 28, 2019
    Posts:
    39
    I have got Vulkan working on Quest and it's reporting stereo mode SinglePassMultiview (whereas before it was multipass) but have not done extensive testing on it yet so maybe it breaks somewhere. I am using a barebones SRP though that avoids a lot of the URP bloat so maybe that's why, but I'll look into it a bit more.
     
  26. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    25
  27. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    25
    That was a good Information. Thank you! So i really get rid of VULKAN
     
    ROBYER1 likes this.
  28. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
    It works with both, but as I said, Vulkan doesn't work in 2020.1 so stick to OpenGLES3 for now
     
  29. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    760
  30. aRCHmage333

    aRCHmage333

    Joined:
    Nov 27, 2016
    Posts:
    11
    Any updates on this?

    LWRP or URP? Which one to pick for Oculus Quest builds?

    Does any of it work out of the box or do we need to bend over backwards?
    Do any of the two allow for post processing like bloom for instance?
     
unityunity