Any possibility to use (fixed) foveated rendering with OpenXR?

Hello,

I’ve been looking for a way to add fixed foveated rendering to a VR project setup with OpenXR. Ideally, I would like to avoid having to import the vendor specific plugins in my project.

Looking at the release notes for 2021.3.4f1, I noticed the following: Added gaze foveated rendering (GFR) on Vulkan. That seems great, but I unfortunately could not find any documentation on this… any pointer or suggestion?

1 Like

if you have a Meta Quest 2, the OpenXR plugin version 1.5.1 recently released with support for a few OpenXR extensions related to fixed foveated rendering that should work on that HMD: Changelog | OpenXR Plugin | 1.5.3.

You might need to implement a native plugin that can intercept OpenXR calls to xrCreateSwapchain (xrCreateSwapchain(3)) in order to use the XR_FB_swapchain_update_state extension. Documentation for the FFR extensions can be found in the OpenXR spec: The OpenXR™ Specification while the OpenXR Plugin should come with a sample for how you can implement OpenXR function interception.

You can also directly call OpenXR functions from C#. An example of how this can be done can be found in this thread: OpenXR -- Is it no longer possible to get descriptive device names?

1 Like

Anyone implemented this?

As OpenXR is becoming the go-to solution for XR development, an official implementation would be very interesting.

1 Like

If a runtime implements Meta’s set of extensions, and also a Unity OpenXR Feature requests the same set of extensions, the OpenXR plugin will properly utilize them.

Meta’s third party package does this, but you can do it on your own. There are a few native calls that can configure things (FBSetFoveationLevel, FBGetFoveationLevel, FBGetFoveationDynamic), you can figure out the signatures from meta’s package.

When there’s a cross-vendor foveation extension that we see adoption of, we’ll implement that properly. For now, we have the meta version implemented in this way where a third party package can enable it.

5 Likes

thanks for the info, we got the FFR working now with this post. We still trying to figure out how to change the refresh rate with different signatures, you don’t have a hint about it?

1 Like

I’m a bit confused. What is Meta’s third part package? Is it Meta Quest Support enabled from OpenXR feature groups.
And how do you call these functions? (FBSetFoveationLevel, FBGetFoveationLevel, FBGetFoveationDynamic))
I switched from Oculus to OpenXR when adding hand tracking and cannot set the FFR level now using Unity.XR.Oculus.Utils

1 Like