Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Using RefreshRate in Your App

On platforms which support dynamically adjusting the display refresh rate, application developers may request a specific display refresh rate in order to improve the overall user experience, examples include:
1. A video application may choose a display refresh rate which better matches the video content playback rate in order to achieve smoother video frames.
2. An application which can support a higher frame rate may choose to render at the higher rate to improve the overall perceptual quality, for example, lower latency and less flicker.

Supported Platforms and Devices

Platform Headset Supported
PC PC Streaming Focus3/ XR Elite X
Pure PC Vive Cosmos X
Vive Pro series X
AIO Focus3/ XR Elite V

Specification

This chapter will explore how to create more immersive experiences using the Display Refresh Rate feature within the Display Refresh Rate extension.

Environment Settings

1. Check your VIVE OpenXR Plugin version

Controller_Name2.png

In Window > Package Manager, make sure your VIVE OpenXR Plugin 2.0.0 or newer.

2. Enable the RefreshRate feature

In Edit > Project Settings > XR Plug-in Management > OpenXR, enable the XR FB Display Refresh Rate feature.

Controller_Name2.png


Golden Sample

  1. An application to identify what display ref https://dl.vive.com/SDK/openxr/unity/xrpluginmaesh rates the session supports and the current display refresh rate.

  2. An application to request a display refresh rate to indicate its preference to the runtime.

Create a script and attach it onto any GameObject in the scene.

In the script, first add a using namespace.

using VIVE.OpenXR;

1) To Get current Refresh Rate:

{
    float value;
    if (XR_FB_display_refresh_rate.GetDisplayRefreshRate(out value) == XrResult.XR_SUCCESS)
    {
        Debug.Log("GetDisplayRefreshRate = " + value);
    }    
}

2) To Request a specific Refresh Rate:

{
    XR_FB_display_refresh_rate.RequestDisplayRefreshRate(90.0f);
}

3) Check the capacity of the display Refresh Rates of the Device:

{
    UInt32 count;
    float[] values = new float[2];
    XrResult result = XR_FB_display_refresh_rate.EnumerateDisplayRefreshRates(displayRefreshRateCapacityInput : 0, displayRefreshRateCountOutput:out count, displayRefreshRates: out values[0]);
    if (result == XrResult.XR_SUCCESS)
    {
        Debug.Log("EnumerateDisplayRefreshRates = " + count);
        Array.Resize(ref values, (int)count);
        result = XR_FB_display_refresh_rate.EnumerateDisplayRefreshRates(displayRefreshRateCapacityInput: count, displayRefreshRateCountOutput: out count, displayRefreshRates: out values[0]);
        if (result == XrResult.XR_SUCCESS)
        {
            for (int i = 0; i < count; i++)
            {
                Debug.Log("EnumerateDisplayRefreshRates index " + i + " RefreshRates = " + values[i]);
            }
        }
    }
}

See Also

Display Refresh Rate extension.