From bde94879ad594f3bd90876c9a3ae7f422efa4f29 Mon Sep 17 00:00:00 2001 From: Christopher Bruns Date: Sat, 9 Apr 2016 21:46:14 -0400 Subject: [PATCH] Restore stereoscopic geometry correctness, by inserting a minus sign where it always should have been, after finding that a compensating minus sign, where it probably should not have been anyway, was removed during the recent floating point refactoring. --- src/gl/stereo3d/gl_stereo_leftright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/stereo3d/gl_stereo_leftright.cpp b/src/gl/stereo3d/gl_stereo_leftright.cpp index 6b7f5fe80d..7b12283d2f 100644 --- a/src/gl/stereo3d/gl_stereo_leftright.cpp +++ b/src/gl/stereo3d/gl_stereo_leftright.cpp @@ -73,7 +73,7 @@ VSMatrix ShiftedEyePose::GetProjection(FLOATTYPE fov, FLOATTYPE aspectRatio, FLO /* virtual */ void ShiftedEyePose::GetViewShift(FLOATTYPE yaw, FLOATTYPE outViewShift[3]) const { - FLOATTYPE dx = cos(DEG2RAD(yaw)) * vr_hunits_per_meter * shift; + FLOATTYPE dx = -cos(DEG2RAD(yaw)) * vr_hunits_per_meter * shift; FLOATTYPE dy = sin(DEG2RAD(yaw)) * vr_hunits_per_meter * shift; outViewShift[0] = dx; outViewShift[1] = dy;