]> git.tdb.fi Git - libs/vr.git/commitdiff
Fix a math error in oversize calculation
authorMikko Rasa <tdb@tdb.fi>
Sat, 21 Sep 2013 17:09:45 +0000 (20:09 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 21 Sep 2013 17:09:45 +0000 (20:09 +0300)
source/oculusriftcombiner.cpp

index 6d5ebf123ea2812e115c7ee29562c5e49dbf2f39..b15c86be54a41e6e3d54b82702bd945b605e1bf3 100644 (file)
@@ -147,7 +147,7 @@ void OculusRiftCombiner::update_parameters()
 
        /* Determine the necessary scaling factor to avoid quality degradation in
        the center of the screen. */
-       float horiz_oversize = distort((fill_factor-lens_separation)*2)-eye_offset;
+       float horiz_oversize = distort((fill_factor-lens_separation)*2)/((fill_factor-lens_separation)*2)-eye_offset;
        float vert_oversize = distort(1.25f*fill_factor)/(1.25f*fill_factor);
        oversize = min(horiz_oversize, vert_oversize);