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/save/SaveRenderer.java
93 93
    mMove = new Static3D(0,0,0);
94 94
    mScaleMain = new Static3D(1,1,1);
95 95

  
96
    mEffects = new DistortedEffects();
96
    mEffects = new DistortedEffects(1);
97 97
    mEffects.apply( new VertexEffectSink(diSink, pLeft , sinkRegion) );
98 98
    mEffects.apply( new VertexEffectSink(diSink, pRight, sinkRegion) );
99 99
    mEffects.apply( new MatrixEffectScale(mScaleMain));
......
245 245
    bmpHeight = bitmap.getHeight();
246 246
    bmpWidth  = bitmap.getWidth();
247 247

  
248
    mEffects.setStretch(bmpWidth,bmpHeight,0);
249

  
248 250
    if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
249
    if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
251
    if( mTexture==null ) mTexture = new DistortedTexture();
250 252
    mTexture.setTexture(bitmap);
251 253

  
252 254
    if( mOffscreen==null ) mOffscreen = new DistortedFramebuffer( (int)(mScale*bmpWidth) , (int)(mScale*bmpHeight),

Also available in: Unified diff