Synchronizing the Render Frame
Frame Synchronization helps reduce jitter when the GPU cannot complete the previous frame on time, but the following frame can still be rendered promptly.
With Stabilized Frame Synchronization (default), frames are not discarded, providing a smoother gameplay experience. Although this approach may theoretically introduce latency, prediction techniques can minimize the perception of it.
Prompt Frame Synchronization, as shown in the diagram below, allows to use the last completed frame (Frame 1) if the GPU does not finish rendering the current frame (Frame 2) in time. This approach discards Frame 2 if the next frame (Frame 3) finishes rendering on time, reducing overall latency.
VIVE OpenXR Plugin provides the XR_HTC_frame_synchronization extension allows the application to set the frame synchronization mode to adjust the interval between the application frame submission time and the corresponding display time according to the demand of the application.
Supported Platforms and Devices
Platform | Headset | Supported | Plugin Version | |
PC | PC Streaming | Focus 3/XR Elite/Focus Vision | ||
Pure PC | Vive Cosmos | |||
Vive Pro series | ||||
AIO | Focus 3 | V *1 | 2.5.0 and above | |
XR Elite | V *1 | 2.5.0 and above | ||
Focus Vision | V *1 | 2.5.0 and above |
*1: Please use either VIVE Focus Vision with ROM version 7.0.999.220 or newer, or VIVE XR Elite with ROM version 2.0.999.918 or newer.
Specification
The application frame loop relies on xrWaitFrame throttling to synchronize application frame submissions with the display.
This extension allows the application to set the frame synchronization mode to adjust the interval between the application frame submission time and the corresponding display time according to the demand of the application.
The runtime will return the appropriate XrFrameState::predictedDisplayTime returned by xrWaitFrame to throttle the frame loop approaching to the frame rendering time of the application with the consistent good user experience throughout the session.
Environment Settings
You must enable the VIVE XR Frame Synchronization (Beta) extension from Project Settings > XR Plug-in Management > OpenXR and select the Synchronization Mode
from the setting.
Usage
Please note that the synchronization mode cannot be changed during application runtime. The VIVE OpenXR Plugin provides an API to retrieve the currently applied synchronization mode.
using UnityEngine.XR.OpenXR;
using VIVE.OpenXR.FrameSynchronization;
ViveFrameSynchronization feature = OpenXRSettings.Instance.GetFeature<ViveFrameSynchronization>();
string mode = feature ? feature.GetSynchronizationMode().ToString() : "No FS";