Prof-Butts / xwa_ddraw_d3d11

Direct3D 11 implementation of DDraw.dll for XWA with VR support and New Shaders
MIT License
6 stars 4 forks source link

Pose prediction jitter fix #46

Closed morallo closed 3 years ago

morallo commented 3 years ago

This is an attempt to recover the performance improvements of moving WaitGetPoses() to Execute() in ddraw.dll, while fixing the jitter introduced by the pose prediction.

The idea is to compose a "correction" transformation matrix by "undoing" the yaw,pitch,x,y,z transformation applied by CockpitLook using the predicted pose, and then apply the complete actual pose returned by WaitGetPoses() (full rotation+translation).

morallo commented 3 years ago

@Prof-Butts can you test and take a look at the matrix calculations? The positional tracking is broken.

morallo commented 3 years ago

I have made the new tracking optional. You need to add a new config value to CockpitLook.cfg to enable it:

; Experimental alternative head tracking implementation with SteamVR to reduce jitter ; and improve performance. This corrects the pose prediction used by CockpitLook with ; the actual pose of the HMD at the time of rendering in ddraw.dll. ; It will also disable positional tracking in CockpitLookHook, and it will be applied only later in ddraw.dll pose_corrected_headtracking = 1