Project

General

Profile

« Previous | Next » 

Revision 012901f5

Added by Leszek Koltunski about 5 years ago

Invert the order of Matrix Effects. Now, just as in the other queues, the first matrix effect is actually the first to act on the object - not the other way around!

View differences:

src/main/java/org/distorted/library/effectqueue/EffectQueueMatrix.java
149 149
    Matrix.translateM(mViewMatrix, 0, -width*0.5f, -height*0.5f, -distance);
150 150
    if( mipmap!=1 ) Matrix.scaleM(mViewMatrix, 0, mipmap, mipmap, mipmap);
151 151

  
152
    for(int i=0; i<mNumEffects; i++) ((MatrixEffect)mEffects[i]).apply(mViewMatrix,mUniforms,i);
152
    for(int i=mNumEffects-1; i>=0; i--) ((MatrixEffect)mEffects[i]).apply(mViewMatrix,mUniforms,i);
153 153

  
154 154
    Matrix.translateM(mViewMatrix, 0, halfX,halfY,halfZ);
155 155
    Matrix.multiplyMM(mMVPMatrix, 0, projection, 0, mViewMatrix, 0);

Also available in: Unified diff