From 7a9e86adff5d6874fadff290f090e9453ecb5236 Mon Sep 17 00:00:00 2001 From: thomas-zeng Date: Mon, 1 Mar 2021 12:21:09 -0800 Subject: [PATCH] * Removed TryGetDisplayRefreshRate call as openXR does not support it. * Changed default frametarget to 300 so that XR application target fps never throttle the frame cadence. --- com.unity.render-pipelines.universal/Runtime/XR/XRSystem.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.universal/Runtime/XR/XRSystem.cs b/com.unity.render-pipelines.universal/Runtime/XR/XRSystem.cs index ec9330113d3..10017779200 100644 --- a/com.unity.render-pipelines.universal/Runtime/XR/XRSystem.cs +++ b/com.unity.render-pipelines.universal/Runtime/XR/XRSystem.cs @@ -173,9 +173,7 @@ internal List SetupFrame(CameraData cameraData) // Disable vsync on the main display when rendering to a XR device. QualitySettings.vSyncCount = 0; // On Android and iOS, vSyncCount is ignored and all frame rate control is done using Application.targetFrameRate. - // Set targetFrameRate to XR refresh rate (round up) - float frameRate = 120.0f; - frameRate = display.TryGetDisplayRefreshRate(out float refreshRate) ? refreshRate : frameRate; + float frameRate = 300.0f; Application.targetFrameRate = Mathf.CeilToInt(frameRate); CreateLayoutFromXrSdk(camera, singlePassAllowed: true);