Revision 7bebb196
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/main/EffectQueueMatrix.java | ||
---|---|---|
154 | 154 |
void send(DistortedOutputSurface projection, float halfX, float halfY, float halfZ, int variant) |
155 | 155 |
{ |
156 | 156 |
Matrix.setIdentityM(mViewMatrix, 0); |
157 |
Matrix.translateM(mViewMatrix, 0, -projection.mWidth/2, projection.mHeight/2, -projection.mDistance); |
|
157 |
Matrix.translateM(mViewMatrix, 0, -projection.mWidth/2, -projection.mHeight/2, -projection.mDistance);
|
|
158 | 158 |
float mipmap = projection.mMipmap; |
159 | 159 |
if( mipmap!=1 ) Matrix.scaleM(mViewMatrix, 0, mipmap, mipmap, mipmap); |
160 | 160 |
|
161 | 161 |
for(int i=0; i<mNumEffects; i++) ((MatrixEffect)mEffects[i]).apply(mViewMatrix,mUniforms,i); |
162 | 162 |
|
163 |
Matrix.translateM(mViewMatrix, 0, halfX,-halfY,-halfZ);
|
|
163 |
Matrix.translateM(mViewMatrix, 0, halfX,halfY,halfZ);
|
|
164 | 164 |
Matrix.multiplyMM(mMVPMatrix, 0, projection.mProjectionMatrix, 0, mViewMatrix, 0); |
165 | 165 |
|
166 | 166 |
GLES31.glUniform3f( mObjDH[variant] , halfX, halfY, halfZ); |
Also available in: Unified diff
Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).