Search Unity

Bug [Unity 2020.3 + URP] Fixed Foveated Rendering no longer working with different VR platforms

Discussion in 'VR' started by DanjelRicci, Nov 8, 2022.

  1. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    No matter the settings, FFR seems to be gone for good with the following VR platforms: Meta, Pico, Qiyu.

    The platform specific metric overlay apps will show the correct foveation level value, but actual FFR on screen is missing. In fact game performance is not as good as previous released versions of the game where FFR was working correctly.

    For my specific case, I have three projects with the same common configuration, and different plugins for each platform:
    Common: Unity 2020.3.40f + URP 10.10.1 + OpenGL + XR Plugin Management 4.2.1
    Meta: Oculus Integration v46.0
    Pico: Pico Unity Integration v2.1.1
    Qiyu: Qiyu UnityXR SDK v1.4.1

    This happens on all the devices I could test the game on:
    Quest 1, Quest 2, Pico Neo 3, Pico 4, Qiyu Dream, Qiyu Dream Pro.

    I'm following the documentation of each platform to enable FFR and in fact it used to work correctly before. Before what? This I am not sure, maybe it's caused by the latest Unity or URP updates, but I haven't been testing on devices for months.
    Previously I only had this issue with Unity 2021.3.x.
     
  2. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    I only have experience deploying to Quest, but if you're using Renderer Features (Render Objects, etc.) with URP in Unity 2020 it's going to break FFR. Also post processing. Also, just the checkbox that enables post processing on the camera (even if you have post processing disabled) will break FFR.

    I've been using URP with Unity 2021.3.12 and FFR is working with OpenGL and Vulkan, but there are multiple checkboxes throughout Unity that will break it. Here's a Twitter thread about how I did my setup:
    https://twitter.com/drktbl/status/1552743928322875395?s=20&t=pwDcLnS-Fs42GiDwILtRjA

    Edit: I recommend upgrading to Unity 2021 because there's a critical fix in URP 12 that allows you to use some Renderer Features without breaking FFR that isn't being backported to URP 10. (Unfortunately, there's also an acknowledged performance regression that *might* get fixed.)
     
    glenneroo likes this.
  3. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    Thanks @Dark-Table, though I don't use any Renderer Feature or post processing, and I already had set my checkboxes correctly, in fact FFR was working correctly before. 2021 is out of the equation for me, when I tried it, URP performance loss was way too much.

    Anyways, I found the culprit: once again, it's URP, specifically 10.10.1. Downgrading it to 10.10.0 solves the issue, at least for Meta and Qiyu- Pico might have issues in their own SDK, I am verifying that with someone from their SDK team.

    UPDATE: using URP 10.10.0, FFR works on Pico too (they still have issues on their SDK, but it's an unrelated problem).
     
    Last edited: Nov 10, 2022
    Cloudwalker_ and Dark-Table like this.
  4. Cloudwalker_

    Cloudwalker_

    Joined:
    Jan 3, 2014
    Posts:
    140
    Running urp 12 on 2021.3.12. My Qiyu Dream Pro seems to have FFR on all the time? There is a obvious ring around the edges of the display that is lower resolution than the rest, and it is visible regardless of the FFR setting I set. I'm curious if that's the FFR or something else.

    When cycling through the FFR levels I don't see any difference.
     
  5. yogurit

    yogurit

    Joined:
    Oct 19, 2020
    Posts:
    1
    I found that the missing of ClearColor operation before opaque pass breaks FFR after URP 10.10.1.

    Just comment the
    CameraClearFlags.Skybox
    part in
    ScriptableRenderer.GetCameraClearFlag
    , FFR will come back (tested on Pico).

    Code (CSharp):
    1.  
    2. protected static ClearFlag GetCameraClearFlag(ref CameraData cameraData)
    3. {
    4.     // ......
    5.     if (cameraData.renderType == CameraRenderType.Overlay)
    6.         return (cameraData.clearDepth) ? ClearFlag.Depth : ClearFlag.None;
    7.  
    8.     // if ((cameraClearFlags == CameraClearFlags.Skybox && RenderSettings.skybox != null) ||
    9.     //    cameraClearFlags == CameraClearFlags.Nothing)
    10.     //            return ClearFlag.Depth;
    11.  
    12.     return ClearFlag.All;
    13. }
    14.  
     
    DanjelRicci likes this.
  6. solsnare

    solsnare

    Joined:
    Dec 7, 2016
    Posts:
    23
    Is this still a problem? I am on URP 12.1.8 and Unity 2021.3.16f1 and I noticed that FFR is not working at all on OpenGL. (On Quest 2 BTW)
    When I switch to Vulkan, it does work, but Vulkan seems to generally perform slower, maybe by 10FPS depending on the situation. (I also tested SpaceWarp & it definitely lowers performance by another 10FPS.. is it possible that it helps on the hardware side in such a way that FPS counter in OVR metrics isn't displaying the benefits?)

    I went through render doc and can see that Vulkan definitely does get impacted by FFR, whereas OpenGL does not.

    How it looks with FFR on at max on Vulkan:

    How it looks with it off:

    OpenGL looks the exact same as it being off no matter the FFR setting.

    That being said, I find that Vulkan + max FFR level is equivalent to OpenGLES3 in performance.

    What I'm wondering is if I can get OpenGL + FFR working, if the performance would be superior to Vulkan.

    Anyone having similar issues? I am going to try the fix from @yogurit now and report back.
     
    Last edited: Jan 7, 2023
    DanjelRicci likes this.
  7. solsnare

    solsnare

    Joined:
    Dec 7, 2016
    Posts:
    23
    Also just FYI, when I go to 2020.3.38f1. It doesn't seem to be working on OpenGL either. Also strangely, the size of the tiles is way more fine grained which could be affecting rendering performance?



    Don't mind the visuals, I've tested renderdoc on this project as well and it looked identical as above.

    How tf is it possible that FFR + OpenGL has been broken for so long.
     
    DevDunk likes this.
  8. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    Have you checked your URP version? When using 2020.3.x, URP 10.10.1 breaks FFR as tested earlier on in this thread, but 10.10.0 works fine.
     
  9. solsnare

    solsnare

    Joined:
    Dec 7, 2016
    Posts:
    23
    I'm not quite sure how to downgrade URP tbh lol

    Actually wtf, I already did downgrade it. How did you confirm whether or not FFR is actually working? I ask because I checked in RenderDoc and it doesn't show what the Vulkan one does. Makes me suspect it's not working.
     
    Last edited: Jan 12, 2023
  10. Alex_Heizenrader

    Alex_Heizenrader

    Joined:
    May 16, 2019
    Posts:
    95
    Btw working on regular renderer FFR only works for Medium and High Top, Low and High don't do anything. Done from inside the app from code and even from adb. Really weird
     
  11. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,059
    If on the latest lts/techstream/beta, make a bug report with repro project