Project

General

Profile

« Previous | Next » 

Revision 687263cc

Added by Leszek Koltunski about 4 years ago

Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)

View differences:

src/main/java/org/distorted/examples/deform/DeformRenderer.java
81 81
      { 
82 82
      mView = view;
83 83

  
84
      mEffects    = new DistortedEffects();
84
      mEffects    = new DistortedEffects(1);
85 85
      mRegion     = new Static4D(0,0,0,0);
86 86
      mMove       = new Static3D(0,0,0);
87 87
      mTouchPoint = new Static3D(0,0,0);
......
209 209
       stretchCanvas.drawRect(              0, h*i/NUM_LINES-1, w              , h*i/NUM_LINES+1, paint);
210 210
       }
211 211

  
212
     if( mTexture==null ) mTexture = new DistortedTexture(w,h);
212
     mEffects.setStretch(w,h,0);
213

  
214
     if( mTexture==null ) mTexture = new DistortedTexture();
213 215
     mTexture.setTexture(stretchBitmap);
214 216

  
215 217
     mMove.set(scrWidth/4,scrHeight/4,0);

Also available in: Unified diff