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/girl/GirlRenderer.java
115 115
      diHips.add(dMiddle);
116 116
      diHips.add(dBegin);
117 117

  
118
      mEffects = new DistortedEffects();
118
      mEffects = new DistortedEffects(1);
119 119

  
120 120
      mEffects.apply( new VertexEffectSink   ( diSink, pLeft , sinkRegion) );
121 121
      mEffects.apply( new VertexEffectSink   ( diSink, pRight, sinkRegion) );
......
210 210
     bmpHeight = bitmap.getHeight();
211 211
     bmpWidth  = bitmap.getWidth();
212 212

  
213
     if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
213
     mEffects.setStretch(bmpWidth,bmpHeight,0);
214

  
215
     if( mTexture==null ) mTexture = new DistortedTexture();
214 216
     mTexture.setTexture(bitmap);
215 217

  
216 218
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);

Also available in: Unified diff