Closed Zyro1331 closed 2 weeks ago
Unfortunately this is not possible.
If VR SDK is active, it takes full control over the framerate and these options are simply ignored by Unity.
If VR SDK is active, it takes full control over the framerate and these options are simply ignored by Unity.
That's the issue, VSync should be ignored but it isn't. Which I feel isn't optimal for Hotswitch users. I keep my VSync enabled intentionally to keep some system resources free for other applications when using pure Desktop mode, but when VR SDK is active, VSync becomes is kind of pointless when your framerate is already capped to your HMD's refresh rate. I'd prefer the setting be ignored or default disabled if another device is using it's own VSync, just like how Resonite behaved before the VSync setting was added.
Can you provide context on which headset / VR SDK you are using, @Zyro1331?
I've noticed before that Oculus headsets will clamp the refresh rate to a much lower value while the user is outside of the headset- this results in the low framerate/high frametime output you demonstrated above.
VSync in Resonite was always previously forced on, so the behaviour should be the same as it was before if VSync is on.
Can you provide context on which headset / VR SDK you are using, @Zyro1331?
I've noticed before that Oculus headsets will clamp the refresh rate to a much lower value while the user is outside of the headset- this results in the low framerate/high frametime output you demonstrated above.
VSync in Resonite was always previously forced on, so the behaviour should be the same as it was before if VSync is on.
I am using Steam VR (via SteamLinkVR) with a Meta Quest 3 The clamped framerate becomes far lower when the headset disconnects, forcing the Steam VR to force framerate to below 10 FPS. However this can simply be avoided by keeping the headset connected by disabling the automatic sleep setting and keeping the headset plugged in.
On previous builds, when I Hotswitched back to desktop mode, Unity's VSync would remain off just as normal to reduce render latency. It would stay force-disabled as long as the VR SDK was active. But now on newer builds of Resonite, VSync will stay disabled when Present in VR, but as soon as you Hotswitch to desktop mode, VSync suddenly enables, which is not as it behaved previously.
I think you might be misunderstanding/misinterpreting your findings?
In both cases the VR SDK is controlling the framerate/refresh rate. As you pointed out, and as I mentioned above- what is happening is that the VR compositor is clamping the framerate to <10 while the headset is asleep.
Resonite isn't controlling the framerate/refresh rate/VSync at all- it's the VR SDK as Frooxius mentioned above.
Resonite isn't controlling the framerate/refresh rate/VSync at all- it's the VR SDK as Frooxius mentioned above.
I am confident that it is, as the framerate takes a large hit when toggling the setting on or off. Here is a screen recording of the behavior. Including Steam VR's own Frame time graph taking a large hit after VSync is enabled. Note that when VR mode is enabled, the toggle is ignored, as it should be.
Seeking input from @Frooxius - it does seem like there is some anomalous behaviour here as the above video demonstrates.
I've looked into this more and we just disable the VSync & Frame limiting when VR is active, it doesn't work with an active VR SDK and seems to misbehave.
This has been released in 2024.5.4.678, thanks!
Describe the bug?
When Resonite is connected to an VR headset, switching back to Desktop mode will not adapt to the main display's refresh rate, which causes VSync to induce very high amounts of unnecessary display latency.
To Reproduce
Expected behavior
The settings toggle for VSync needs to be completely disabled when a VR headset is present. Due to the fact that Resonite's renderer needs the framerate to stay limited to the VR Headset's refresh rate.
Screenshots
Here's an example of what occurs when VSync is enabled and disabled.
(Screenshot of frame-time graph, the orange line is the engine latency, and the blue line is the rendering latency)
Resonite Version Number
Beta 2024.5.3.467
What Platforms does this occur on?
Windows
What headset if any do you use?
Meta Quest 3 (SteamLinkVR) + Desktop
Log Files
MANGOVRG - 2024.5.3.467 - 2024-05-03 03_35_09.log
Additional Context
No response
Reporters
@Zyro1331