Revision 687263cc
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java | ||
---|---|---|
95 | 95 |
dRight.add( new Static3D( 0, 0, 0) ); |
96 | 96 |
dRight.add( new Static3D( 20, 10, 0) ); |
97 | 97 |
|
98 |
mEffects = new DistortedEffects(); |
|
98 |
mEffects = new DistortedEffects(1);
|
|
99 | 99 |
mEffects.apply( new VertexEffectDistort(dLeft , pLeft , rLeft ) ); |
100 | 100 |
mEffects.apply( new VertexEffectDistort(dRight, pRight, rRight) ); |
101 | 101 |
|
... | ... | |
262 | 262 |
bmpHeight = bmp.getHeight(); |
263 | 263 |
bmpWidth = bmp.getWidth(); |
264 | 264 |
|
265 |
if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight); |
|
265 |
mEffects.setStretch(bmpWidth,bmpHeight,0); |
|
266 |
|
|
267 |
if( mTexture==null ) mTexture = new DistortedTexture(); |
|
266 | 268 |
mTexture.setTexture(bmp); |
267 | 269 |
|
268 | 270 |
if( mMesh==null ) mMesh = new MeshRectangles(9,9*bmpHeight/bmpWidth); |
Also available in: Unified diff
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)