Project

General

Profile

« Previous | Next » 

Revision c5b1451b

Added by Leszek Koltunski almost 8 years ago

Remove the 'invert' option from DistortedProjection - this was making the DistortedNode-based apps not show the Objects, because the winding of triangles was wrong.
Now however the DistortedNode based stuff is inverted top-down :)

View differences:

src/main/java/org/distorted/library/EffectQueueMatrix.java
227 227
        }
228 228
      }
229 229
   
230
    Matrix.translateM(viewMatrix, 0, mObjHalfX,-mObjHalfY, -mObjHalfZ);
230
    Matrix.translateM(viewMatrix, 0, mObjHalfX,-mObjHalfY, 0);
231 231
    Matrix.multiplyMM(mMVPMatrix, 0, dp.projectionMatrix, 0, viewMatrix, 0);
232 232
    
233 233
    GLES20.glUniform3f( mObjDH , mObjHalfX, mObjHalfY, mObjHalfZ);
......
242 242
  synchronized void sendNoEffects(DistortedProjection dp) 
243 243
    {
244 244
    Matrix.setIdentityM(mTmpMatrix, 0);
245
    Matrix.translateM(mTmpMatrix, 0, mObjHalfX-dp.width/2, dp.height/2-mObjHalfY, mObjHalfZ-dp.distance);
245
    Matrix.translateM(mTmpMatrix, 0, mObjHalfX-dp.width/2, dp.height/2-mObjHalfY, -dp.distance);
246 246
    Matrix.multiplyMM(mMVPMatrix, 0, dp.projectionMatrix, 0, mTmpMatrix, 0);
247 247
    
248 248
    GLES20.glUniform3f( mObjDH , mObjHalfX, mObjHalfY, mObjHalfZ);

Also available in: Unified diff