]> git.tdb.fi Git - libs/vr.git/commitdiff
Correct field of view calculation for Oculus Rift
authorMikko Rasa <tdb@tdb.fi>
Sun, 9 Mar 2014 13:07:16 +0000 (15:07 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 9 Mar 2014 13:07:16 +0000 (15:07 +0200)
source/oculusriftcombiner.cpp

index 3ebbcc88914aea5d070bf265c5cd27556cf5274c..67b4729638adf27d9fd36fee7aa2614b91a73429 100644 (file)
@@ -155,7 +155,7 @@ void OculusRiftCombiner::update_parameters()
        left_shdata.uniform("scale", 2.0f, 2.5f, oversize);
        right_shdata.uniform("scale", 2.0f, 2.5f, oversize);
 
-       fov = Geometry::atan(oversize*0.625f/view_distance)*2.0f;
+       fov = Geometry::atan(oversize*0.625f/view_distance/2)*2.0f;
        frustum_skew = lens_separation*2-1;
 }