Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uninitialized HMD warping coefficient
The HMD warping shader uses the cubic warping coefficient, but we weren't initializing it. This fix ensures it's set to zero in both HMD backends. It's unsatisfying to force the GPU to perform a calculation using a value that is known to be zero. We'd squeeze out a few cycles by eliminating the cubic term from the shader. But it's there in the Oculus code, so we better keep it here. Oculus is *really* inconsistent in its handling of distortion coefficients. The shader reads four, but the library writes three. Meanwhile, the device itself reports six! The Oculus SDK avoids inconsistency by memsetting the entire array to 0. Props @parasti for uncovering this flaw.
- Loading branch information