Revision a5bbbdea
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/library/DistortedFramebuffer.java | ||
---|---|---|
85 | 85 |
float right = -mX+mWidth /2.0f; |
86 | 86 |
float bottom = -mY-mHeight/2.0f; |
87 | 87 |
float top = -mY+mHeight/2.0f; |
88 |
float near = (top-bottom) / (2.0f*(float)Math.tan(Math.PI/360));
|
|
89 |
mDistance = mHeight*near/(top-bottom);
|
|
90 |
float far = 2*mDistance-near;
|
|
91 |
mDepth = (int)((far-near)/2);
|
|
88 |
float near = (mWidth+mHeight)/2;
|
|
89 |
mDistance = 2*near;
|
|
90 |
float far = 3*near;
|
|
91 |
mDepth = (int)near;
|
|
92 | 92 |
|
93 | 93 |
Matrix.orthoM(mProjectionMatrix, 0, left, right, bottom, top, near, far); |
94 | 94 |
} |
Also available in: Unified diff
Fix parallel projection.