Vive distortion improvements
These patches bring the Vive (DPOLY3) distortion algorithm closer to the reference SteamVR implementation. It's still not perfect, but comparing Monado's generated distortion meshes with SteamVR's shows a significant error reduction.
I originally noticed the error while running the
hello_xr sample application from the OpenXR SDK. With the uncorrected implementation, the faces of the RGB cubes that the sample draws will appear to tear apart as they shift from the center to the edges of the viewport.
Because the error and the change are subtle, I've attached some comparison graphs. The data was gathered by calling u_compute_distortion_vive (Monado) and IVRSystem::ComputeDistortion (SteamVR) on a 64x64 point grid while each system was driving an HTC Vive headset. I can provide raw data and the Mathematica notebook, if required.