Description

Additional Info From User:

 

Result: Vsync will get turned off by FSteamVRHMD::Startup() setting a global console variable, regardless of your project configuration.

Expected: Vsync is only deactivated when switching to VR via enable stereo.

 

"The other plugins like Oculus and OpenXR handle this by setting SyncInterval = 0 inside of their custom present function (bool FCustomPresent::Present(int32& SyncInterval)). This makes it apply only when VR is in use, without breaking things in 2D. SteamVR should do the same.

 
Launching a steamvr headset and with '-game' then shows:
 
  [2020.02.20-04.16.13:258][  0]LogConsoleManager: Warning: Setting the console variable 'r.VSync' with 'SetByGameSetting' was ignored as it is lower priority than the previous 'SetByCode'. Value remains '0'  
 
and querying on console with `r.vsync?` shows:
 
[2020.02.20-04.16.18:531][199]HELP for 'r.VSync':
0: VSync is disabled.(default)
1: VSync is enabled.
[2020.02.20-04.16.18:531][199]r.VSync = "0"      LastSetBy: Code
 
 
However, launch with a different headset plugin, or turning off steamvr with -nohmd yields:
 
`-game -nohmd`:

`r.Vsync? `
 
:143][218]HELP for 'r.VSync':
0: VSync is disabled.(default)
1: VSync is enabled.
[2020.02.20-04.12.36:143][218]r.VSync = "1"      LastSetBy: ProjectSetting
 
 
The Oculus and OpenXR main plugins don't overwrite your project vsync setting and instead only disable it through their custom present class.
 
I just checked through and at first search through the code it it looks like the WindowsMixedReality plugin doesn't touch InOutSyncInterval in its custom Present function and also don't set the console variable like the SteamVR plugin, so that might be a bigger bug.
 
All plugins should likely set  InOutSyncInterval = 0 in their custom Present and not touch r.vsync. Steamvr touches r.vsync, and WMR doesn't seem to handle vsync at all. "
 

Steps to Reproduce
  1. Add the following to your DefaultEngine.ini

[/Script/Engine.RendererSettings]
r.VSync=1
r.VSyncEditor=1

  1. Package and launch project

Result: When SteamVR is running, VSync setting will not be respected
             Exit SteamVR, Create a shortcut to packaged project and run with -nohmd , vsync will be respected

 

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-89321 in the post.

1
Login to Vote

Fixed
ComponentUE - Platform - XR
Affects Versions4.24.2
Target Fix4.25
Fix Commit11931234
Main Commit11931240
Release Commit12169964
CreatedFeb 21, 2020
ResolvedMar 5, 2020
UpdatedJul 30, 2020
View Jira Issue