Fix frustum skew calculation
authorMikko Rasa <tdb@tdb.fi>
Tue, 23 Dec 2014 16:31:10 +0000 (18:31 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 23 Dec 2014 16:31:10 +0000 (18:31 +0200)
This error wasn't apparent on the Rift DK2 and its almost-symmetric field
of view.

source/oculusriftcombiner.cpp

index a9808de75a4c72a059b4365a9d499bbc1e4a1fc6..86d32b031d6b2f590920a6a1ddd649d65071b10a 100644 (file)
@@ -92,7 +92,7 @@ OculusRiftCombiner::OculusRiftCombiner(const OculusRiftDevice &d):
 
        float inner = max(left_fov.RightTan, right_fov.LeftTan);
        float outer = max(left_fov.LeftTan, right_fov.RightTan);
-       frustum_skew = (inner-outer)*2/(inner+outer);
+       frustum_skew = (inner-outer)/(inner+outer);
 
        left_fov.UpTan = right_fov.UpTan = vertical;
        left_fov.DownTan = right_fov.DownTan = vertical;