commit 390ebefc2388984c780ba3737bdaccfdd53fd2b2
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Thu Dec 8 11:12:38 2016 +0000

    Fix with Projection

diff --git a/src/main/java/org/distorted/library/DistortedFramebuffer.java b/src/main/java/org/distorted/library/DistortedFramebuffer.java
index cb26f49..518398a 100644
--- a/src/main/java/org/distorted/library/DistortedFramebuffer.java
+++ b/src/main/java/org/distorted/library/DistortedFramebuffer.java
@@ -67,10 +67,10 @@ public class DistortedFramebuffer
       {
       if( mFOV>0.0f )  // perspective projection
         {
-        float left   =(-mX-mWidth )/mHeight;
-        float right  =(-mX+mWidth )/mHeight;
-        float bottom =(-mY-mHeight)/mHeight;
-        float top    =(-mY+mHeight)/mHeight;
+        float left   =(-mX-mWidth/2 )/mHeight;
+        float right  =(-mX+mWidth/2 )/mHeight;
+        float bottom =(-mY-mHeight/2)/mHeight;
+        float top    =(-mY+mHeight/2)/mHeight;
         float near= (float)( (top-bottom) / (2*Math.tan(mFOV*Math.PI/360)) );
         mDistance = (int)(mHeight*near/(top-bottom));
         float far = 2*mDistance-near;
