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/sink/SinkRenderer.java
65 65
    sink.add(new Static1D(1.0f));
66 66
    sink.add(new Static1D(0.2f));
67 67

  
68
    mEffects = new DistortedEffects();
68
    mEffects = new DistortedEffects(1);
69 69
    VertexEffectSink sinkEffect = new VertexEffectSink(sink, new Static3D(297, 280, 0), null);
70 70
    mEffects.apply(sinkEffect);
71 71

  
......
129 129
    bmpHeight = bitmap.getHeight();
130 130
    bmpWidth  = bitmap.getWidth();
131 131

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

  
134
    if( mTexture==null ) mTexture = new DistortedTexture();
133 135
    mTexture.setTexture(bitmap);
134 136
    if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
135 137

  

Also available in: Unified diff