Trying to make eye tracked foveated rendering to work for PCVR project. Made a new project, did everything according to documentation page:
Made fresh Unity 6 6000.0.23f1 URP project, changed Graphics API to DirectX12, installed XR Plug-In Management, enabled OpenXR, in OpenXR settings set Foveated Rendering API to SRP Foveation, enabled Foveated Rendering in OpenXR Feature Groups.
Tested with Quest Pro via AirLink and SteamLink. Tried both Meta XR Runtime and SteamXR runtime. Sending eye and face tracking data enabled in Quest headset. It also enabled in Meta Quest Link desktop app and in SteamLink.
As soon as I launch empty scene it appears in headset but in Unity log spammed every frame with messages:
Use of GfxDeviceD3D12::DispatchComputeProgram is forbidden during a render pass!
Next, I tried using example code to activate foveated rendering:
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class FoveationStarter : MonoBehaviour
{
List<XRDisplaySubsystem> xrDisplays = new List<XRDisplaySubsystem>();
void Start()
{
SubsystemManager.GetSubsystems(xrDisplays);
if (xrDisplays.Count == 1)
{
xrDisplays[0].foveatedRenderingLevel = 1.0f; // Full strength
xrDisplays[0].foveatedRenderingFlags
= XRDisplaySubsystem.FoveatedRenderingFlags.GazeAllowed;
}
}
}
As soon as it executed Unity Editor crashes instantly.
Crash only happens if I have something on scene, a simple Unity Cube for example.
Tried updating OpenXR Plugin from 1.12.1 to 1.13.0 but it did not help.
Also tried using Vulkan insted of DirectX12.
In this case there is no log spam in editor log and activating foveated rendering with script does not crash an editor but foveation pattern looks completely wrong and does not react to eye tracking: left part of right screen very pixelated, middle part is less pixelated and right part not pixelated. Same for left screen but in reverse.
Red - high pixelation, yellow - mid pixelation, green - no pixelation.
System specs:
Windows 11 23H2 22631.4317
i7-12700K
32Gb RAM
GeForce RTX 2080 Driver 561.09
Hello! Thank you so much for the info, let me know if you’ve already submitted a bug report and have an issue tracker link. It would be great to have a full scene to look at the issue!
Yes, I submitted bug report too. Sent it few days ago on Unity 6000.0.22f1. Updating to release version of Unity 6000.0.23f1 did not fix the issue.
Issue tracker link: IN-86717
Hey, just looping back here to confirm we were able to repro the issue, the bug has entered triage to get looked at by a dev team so you should get updates via the issue tracker. Thank you so much for taking the time to submit everything!
I have the same issues with SRP Foveated Rendering with a Varjo VR-3 via OpenXR. The only good thing is that the editor doesn’t crash
When using DX12, editor spams this log every frame and it doesn’t look like Foveated Rendering is working:
Use of GfxDeviceD3D12::DispatchComputeProgram is forbidden during a render pass!
When using Vulkan, the rendering is highly pixelated in the center, exactly as decribed by the drawing in the original post. It doesn’t react to eye tracking too.
While the crash issue is fixed, the other issues raised by original poster aren’t
What is the state of SRP foveation in Unity 6 OpenXR? Should it work with Varjo headset out of the box?
System information:
Varjo VR-3
RTX 3080 (Drivers 566.36)
Windows 10 22H2
Varjo Base 4.6.1.11
Unity 6000.0.36f1
OpenXR 1.14.0
Yes, they fixed the crash but not other issues. Seems like that SRP Foveation only actually works on Android builds and not on PCVR. I kinda gave up on this for now.