alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.54k stars 490 forks source link

Tracking rewrite #2481

Open zmerp opened 3 weeks ago

zmerp commented 3 weeks ago

The goal is to move prediction on the server side for Monado support and implement better tracking algorithms

zmerp commented 3 weeks ago

@The-personified-devil if you want you can continue the discussion here

The-personified-devil commented 3 weeks ago

My point about the offset is that if we're already lying to Steamvr by predicting ahead of the frame render time we should at least tell it the most accurate info. I.e. that there's no additional offset to correct for. The only question is how to implement prediction increase. We can increase the offset to make steamvr predict more, or add or subtract from the predict to timestamp (or perhaps even adjust algos). Or we make a second setting for it

zmerp commented 3 weeks ago

My point about the offset is that if we're already lying to Steamvr by predicting ahead of the frame render time we should at least tell it the most accurate info. I.e. that there's no additional offset to correct for

The thing is we want the final rendered frame to have the pose that the client expects. We have to trick SteamVR by partially predicting the poses in advance, so that when it predicts to its virtual vsync, it's actually predicting to the real vsync.

We can increase the offset to make steamvr predict more

We tried, and this upsets SteamVR, causing spikes in game render latency or just clamping the prediction.

Or we make a second setting for it

We can try this