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/blur/BlurRenderer.java
78 78
      mBufferMove = new Static3D(0,0,0);
79 79
      mBufferScale= new Static3D(1,1,1);
80 80

  
81
      mBufferEffects = new DistortedEffects();
81
      mBufferEffects = new DistortedEffects(1);
82 82
      mBufferEffects.apply(new MatrixEffectScale(mBufferScale));
83 83
      mBufferEffects.apply(new MatrixEffectMove(mBufferMove));
84 84

  
85
      mEffects = new DistortedEffects();
85
      mEffects = new DistortedEffects(1);
86 86
      mEffects.apply( new PostprocessEffectBlur(radiusDyn) );
87 87
      mEffects.apply(new MatrixEffectScale(mScale));
88 88
      mEffects.apply(new MatrixEffectMove(mMove));
......
155 155
     mObjHeight = bitmap.getHeight();
156 156
     mObjWidth  = bitmap.getWidth();
157 157

  
158
     if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight);
158
     mEffects.setStretch(mObjWidth,mObjHeight,0);
159
     mBufferEffects.setStretch(SIZE,SIZE,0);
160

  
161
     if( mTexture==null ) mTexture = new DistortedTexture();
159 162
     mTexture.setTexture(bitmap);
160 163

  
161 164
     mScreen.detachAll();

Also available in: Unified diff