Can't Enable FFR w/ URP - Oculus Quest 2

Hello!

Unity Version 2021.3.4f1.
URP version 12.1.7

I am working on a VR game for the Oculus Quest 2 using URP and we are having trouble enabling FFR for our title as we’re currently GPU bound and would like to have FFR working so we’re able to accurately profile our game using all the features we can.

I’m aware there are a number of things that can break FFR, but I don’t believe we’re doing any of them. No post processing, disabled depth texture/opaque texture in URP settings object, etc.

Is there a best way to figure out what’s disabling FFR in our project? I’m launching a scene that isn’t currently running at 72 FPS and using the command adb shell setprop debug.oculus.foveation.level 4 to try and force FFR on but it makes no difference.

Any advice on how I can debug this?

Zach

I think you are missing some info

Hi! Sorry The post has been updated with all the correct information, Made a typo and submitted the issue while trying to fix it.

Make sure you use the oculus xr plugin and oculus integration and call ffr via code instead of adb commands. Are you using OVRMetrics to check FFR level?

Also, definitely update unity to the latest LTS for a good performance bump as well (:

1 Like

Yes!

I am using the Oculus XR Plugin and not OpenXR, and I am attempting to enable FFR via code.

My code for enabling FFR looks like this:

public class EnableFoveated : MonoBehaviour
{
    private void Awake()
    {
        InputFocusAquired();
        OVRManager.InputFocusAcquired += InputFocusAquired;
    }

    void InputFocusAquired()
    {
        OVRManager.foveatedRenderingLevel = OVRManager.FoveatedRenderingLevel.HighTop;
        OVRManager.useDynamicFoveatedRendering = true;
    }
}

I added the FFR level to my OVR graph and it looks like this script isn’t correctly setting the foveation level however the ADB command does trigger the foveation level to increase to the specified amount (however I’m seeing no difference in visual quality despite trying to set FFR to the max level, and no changes in FPS graph in OVR metrics tool)

Does the code even run?

Yes!

I was actually able to fix the foveation not being set by changing the code to the following:

        OVRManager.foveatedRenderingLevel = OVRManager.FoveatedRenderingLevel.Low;
        OVRManager.foveatedRenderingLevel = OVRManager.FoveatedRenderingLevel.HighTop;
        OVRManager.useDynamicFoveatedRendering = true;

I saw somewhere it was a bug that a cached value was being used and that by changing the value twice you could set it to the appropriate level. The foveation level is now reflected in the OVRMetricsTool however I am not seeing any sort of visual difference still. I have yet to verify this with a GPU capture in RenderDoc (which will be my next step) but with the level set to HighTop there should be some pretty obvious visual difference with foveation on, I believe

Apparently FFR only works with Vulkan!

Switched the graphics API to auto graphics API and things are running a lot better.
Maybe this could be added into the oculus package as a warning, because I was stuck on this for quite a while. Hope this is useful to someone!

Zach

If it’s said nowhere make a bug report

FFR with OpenGL stopped working since URP 10.10.1.

I’m working on a OpenGL project using URP 12.1.8, and FFR is not visible at all regardless of the level, despite the Overlay Tool shows the correct FFR number. Changing DynamicFFR or Intermediate Texture options does not help.

File a bug report, otherwise it won’t be fixed

1 Like

It was filed last Novemeber. https://issuetracker.unity3d.com/issues/quest-ffr-doesnt-work-with-openges3-when-built-on-oculus-quest

Disable dynamic ffr and set it to high. If it doesn’t work it’s different than the bug report, as the solution there was that it was on dynamic reading the reply

What are these? Im using Unity 2022.3.4 URP (default performant settings), Vulcan API only, I set dynamic to false to manually control switching, and when I trigger it, I can see the FOV changing in OVRMetrics but I’m not visually seeing any difference. I am using OpenXR plugin but if OculusXR was required I would expect the FOV settings to not change.

FYI use “OVRPlugin” instead of “OVRManager” to set “foveatedRenderingLevel” etc then it works with GLES3.

OVRPlugin.foveatedRenderingLevel = OVRPlugin.FoveatedRenderingLevel.HighTop;
OVRPlugin.useDynamicFoveatedRendering = false;

Oculus has major bugs going on right now. Vulkan is also slow as hell.

That message is months old now, but I reverted that project to Unity 2020 using URP 10.10.0 and everything worked as expected. Using Unity 2021+ was not viable back then due to massive performance issues.

BTW spent the entire yesterday trying to figure out what was going on with Quest & Vulkan (tested OculusXR vs OpenXR loaders or combinations of both and settings etc). Turns out URP simply breaks Quest performance if you enable Vulkan. GLES3 it works fine. Or BuiltInRP runs smooth on Quest with Vulkan too. Tested multiple versions but settled on 2023.1.11 for now as 2022 has URP performance issues according to release notes.

Pico 3/4 with URP and Vulkan run smooth as butter. Ever since this OpenXR junk things have gotten worse with Quest.
Now we have a released game built on URP with these issues. I actually wonder if making a custom Quest loader wouldn’t just fix the URP issues as Pico is totally fine here. Otherwise long run need to convert URP shaders to BuiltInRP as Meta clearly is not testing their stuff for URP.

Just posting this for others.

1 Like

It can also be that meta has different results. I just did some testing as well and had no issues with vulkan in urp whatsoever.
Bug reports for stuff like this are always welcome

Do you have TMP text to your scene?
A basic scene with almost nothing in it might run fine.

I used some random models to increase gpu usage. I also measured gpu utelization, which was similar across versions