ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.08k stars 1.28k forks source link

SteamVR dashboard ignores FoV settings #1466

Open zarik5 opened 3 years ago

zarik5 commented 3 years ago

In an OpenVR driver (headers v1.14.15), when setting FoV values with vr::VRServerDriverHost()->SetDisplayProjectionRaw(), normal game frames update correctly but the SteamVR dashboard still uses the FoV values from IVRDisplayComponent::GetProjectionRaw().

Related to JackD83/ALVR/issues/324

zarik5 commented 3 years ago

Update: this has been fixed by sending the vendor-specific event vr::VREvent_LensDistortionChanged. Though I would like to see more consistency in the OpenVR API.

risa2000 commented 3 years ago

Lens distortion change and FOV change are technically two different things. In particular when vr::VREvent_LensDistortionChanged is issued the (OpenVR) runtime re-executes the distortion computation by calling IVRDisplayComponent::ComputeDistortion. I can see why would OpenVR runtime want to recompute the distortion at any FOV change, so I wonder how it can work for normal game frames without the distortion recomputation?

risa2000 commented 3 years ago

@zarik5 Do you run it on Windows or Linux? For me IVRServerDriverHost::SetDisplayProjectionRaw "works" in a very confusing way (#1491).

zarik5 commented 3 years ago

@risa2000 we don't have a working Linux build, because IVRVirtualDisplay methods do not get called. On Windows IVRServerDriverHost::SetDisplayProjectionRaw works after sending vr::VREvent_LensDistortionChanged. We keep IVRDisplayComponent::ComputeDistortion results unchanged (we just copy over the uv values without doing any computation). I don't know the reasons of why the OpenVR API works like that.