Search Unity

  1. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

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:
    1,138
    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:
    21
    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:
    1,138
    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:
    139
  5. ROBYER1

    ROBYER1

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

    daves

    Unity Technologies

    Joined:
    Oct 18, 2018
    Posts:
    21
    @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:
    21
    @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:
    139
    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:
    1,138
    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:
    728
    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:
    348
    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:
    1,138
  15. ROBYER1

    ROBYER1

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

    Claytonious

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

    ROBYER1

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

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,138
    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:
    26
    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:
    26
    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:
    1,138
    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:
    1,138
    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:
    26
  27. welliAR

    welliAR

    Joined:
    Jun 25, 2018
    Posts:
    26
    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:
    1,138
    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:
    1,138
  30. aRCHmage333

    aRCHmage333

    Joined:
    Nov 27, 2016
    Posts:
    12
    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?
     
  31. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    335
    So I may be facing a news issue, using UT 2018.4 and standard RP.
    Now OVR metrics say FFR is activated but not noticeable anymore and zero perf improvements. Did someone ever experienced that?
    Edit : Double-checked using latest 2018.4.21f1 and Oculus integration 15.0
     
    Last edited: Apr 14, 2020
  32. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,081
    This can occur if FFR is being applied to only the final blit. In all versions of URP I tested, it was only applied to the final blit so any actual rendering that would've benefited from it doesn't.... like the whole game for instance.

    I don't know if this is fixed or whatever due to no communication about it. Ideally it would be controllable, and apply to where the work is needed.

    With Vulkan though, it makes sense to go a bit further than just FFR, you can do (dynamic) FR, or other stuff but I have no idea Unity's plans here.

    There are a whole bunch of very observable performance gains Unity can do though since my own little renderer does go a lot faster than URP on Quest, mostly because I don't worry about ES 2.0 and partly because FFR works.

    I think Unity needs to spend a bit more focus time on Vulkan, since getting that right also has pleasant side effects for console etc. I'm rambling about the obvious, sorry :/
     
    Desoxi, jashan, fherbst and 2 others like this.
  33. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    728
    Can you share anything about that little renderer of yours? Maybe as new forum post? Would love to hear more.
     
    ROBYER1 and Gruguir like this.
  34. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    335
    So, I'm not sure what happened, but I guess it's somehow related to a component used on the camera at one point. Once I noticed that it worked in other scenes, I 'simply' replaced my camera with the exact same basic one (same tags, settings) to solve the issue :confused:
     
    ROBYER1 likes this.
  35. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,138
    I had this once also, something bugged out on a camera I was using, even though the values were identical to that of the OVR camera rigs!

    I fixed it by 'copy component values' from the OVR rig and pasting them onto my camera :) no idea how that did it but it did. If it didn't, replace the borked camera with the working one!
     
    Gruguir likes this.
  36. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,081
    You would learn nothing from it. By faster I mean raw throughput and using FFR, something I have a devil of a time achieving in URP. It's very simple too which is why I moan: because Unity wants Oculus to provide these things, and Oculus wants whatever Oculus wants. I don't know. I'm tired of excuses and want Unity's perf where it should be: faster than my own potato.
     
  37. skckmdtk2m

    skckmdtk2m

    Joined:
    Aug 25, 2017
    Posts:
    1
    Currently using URP8.0.1 in Unity2019.3.7f1. One day, MSAA and FFR were out of service.
    Probably, this happened after the software version of Quest was turned to 16.
    Does anyone else have the same symptoms or know of a solution?
     
  38. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,295
    Are there any updates on this? I'm using Unity 2019.3.12, URP 7.3.1. I have two versions of this project, one running on the Legacy RP, the other on URP. With the Legacy RP version, when I call

    Code (CSharp):
    1. OVRManager.fixedFoveatedRenderingLevel = OVRManager.FixedFoveatedRenderingLevel.HighTop;
    I get a significant performance boost. When I do the same in the URP 7.3.1 version of the project, there does not seem to be a noticeable performance boost. In both cases, the OVR Metrics Tool does show FOV = 4.
     
    Claytonious likes this.
  39. GridWanderer

    GridWanderer

    Joined:
    Dec 14, 2014
    Posts:
    12
    @jashan Would you say that the performance benefits gained from FFR warrant the temporary downgrade from URP to the built-in renderer in your case? We are (as everyone else is) currently gpu fill bound, and wondering if we may need to pursue the same.
     
  40. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,295
    In my case, URP is not really an option, yet, anyways. Every once in a while, I try it but then decide to stay on Legacy. PostProcessing does work in URP, while it doesn't when using legacy + PostProcessingV2 ... but postprocessing doesn't really work in URP, either, due to performance. VFX Graph at least compiles when using URP - but doesn't really work on device, either. So for now, URP only adds lots and lots of trouble for us.
     
    ROBYER1 likes this.
  41. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    165
    Any updates on this? :/
     
  42. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    760
    I tried a couple days ago on URP 10.0.0-preview.26 (in 2020.2) and FFR worked out-of-the-box when using
    Unity.XR.Oculus.Utils.SetFoveationLevel(level)
    , which is very promising if you ask me :)

    That being said, 10.1.0-preview.18 was generally super broken, so can't really say "go forth and use this" as of right now. Let's see what the next 10.x release brings...
     
    Desoxi likes this.
  43. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    348
    This has been an issue for over a year and a half. Yet there is no fix.
     
    Desoxi likes this.
  44. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    165
    Unfortunately, yes. I hope unity is going to pay more attention to this as VR is growing and growing.
     
    hippocoder likes this.
  45. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    248
    Any news on this?
    we also need Vulkan renderpass / subpasses to support MultiView, currently there is no exposed way to target both slices of the texture array, and in 2020.1 it looks like SV_RenderTargetArrayIndex was causing shaders to silently fail on Vulkan.
     
  46. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    Due to how many posts this thread has got and with people asking for an update I just wanted to let you all know I've sent this over to the team, they've been awesome in getting back to me so fingers crossed I can get you a response!
     
    jykholodia, Desoxi and FromTheFuture like this.
  47. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey again everyone!

    Details regarding fixed foveated rendering and Vulkan on Quest can be found in our documentation.

    We have been working closely with Oculus, and recently co-hosted a presentation at Facebook Connect 2020 where we share our latest progress. We recommend you check it out!
     
  48. Alex_Heizenrader

    Alex_Heizenrader

    Joined:
    May 16, 2019
    Posts:
    22
    So I am using a camera for my laser input that seems to be causing FFR not to work. If I remove that camera I use for UI raycasting the FFR works well. What should be the proper usage in this case then? Anyone knows?

    I am using basically the OVRCameraRig except adding my laserinput that adds a camera to the scene for raycasting. This is in Unity legacy/standard rendering and 2019.2.9f1
     
  49. gauthierr

    gauthierr

    Joined:
    Jan 31, 2019
    Posts:
    2

    Thank you for the update, do you have any recommended set up for URP and OVRCamera in Unity 2020.1?

    I have many aliasing problems specially with the alphas on my vegetation. I anyone now the correct way to set it up for this kind of problem, let me know!
     
  50. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,656
    Hi @Shaunyowns,
    Just tested latest Unity 2020.2.1f1 / URP / Oculus XR Plugin 1.7 and FFR works out of the box. But still breaks (doesn't nothing) as soon as a render feature is added to the forward renderer (also disables if opaque texture or MSAA is enabled).
    Is this still an issue or is there a workaround?
    Thanks.
     
    Last edited: Jan 11, 2021
    jashan likes this.
unityunity