Project

General

Profile

« Previous | Next » 

Revision 51be198f

Added by Leszek Koltunski over 7 years ago

minor

View differences:

src/main/java/org/distorted/library/DistortedNode.java
259 259

  
260 260
///////////////////////////////////////////////////////////////////////////////////////////////////
261 261

  
262
  int markStencilAndDraw(long currTime, DistortedOutputSurface surface, int quality, float marginInPixels)
262
  int markStencilAndDraw(long currTime, DistortedOutputSurface surface, int quality)
263 263
    {
264 264
    DistortedInputSurface input = mNumChildren[0]==0 ? mSurface : mData.mFBO;
265 265

  
......
273 273
      // Mark area of our object + marginInPixels pixels around with 1s in Stencil buffer
274 274
      buffer2.setAsOutput(currTime);
275 275
      DistortedRenderState.setUpStencilMark();
276
      mEffects.drawPriv(w, h, mMesh, buffer2, currTime, marginInPixels);
276
      mEffects.drawPriv(w, h, mMesh, buffer2, currTime, EffectQueuePostprocess.MAX_BLUR*buffer2.mMipmap);
277 277

  
278 278
      // Actually draw our object.
279 279
      buffer1.setAsOutput(currTime);
src/main/java/org/distorted/library/DistortedOutputSurface.java
201 201
          }
202 202

  
203 203
        int quality = currP.getQuality();
204
        numRenders += child.markStencilAndDraw(time,this,quality,50*mBuffer1[quality].mMipmap);
204
        numRenders += child.markStencilAndDraw(time,this,quality);
205 205

  
206 206
        if( i==num-1 )
207 207
          {
src/main/java/org/distorted/library/EffectQueuePostprocess.java
83 83
  private static final int NUM_GAUSSIAN = GAUSSIAN.length-2;
84 84

  
85 85
  // Support blurs consisting of the present pixel and up to MAX_BLUR pixels in each direction
86
  private static final int MAX_BLUR = 50;
86
  static final int MAX_BLUR = 50;
87 87

  
88 88
  // The (fixed-function-sampled) Gaussian Blur kernels are of the size k0=1, k1=2, k2=2, k3=3, k4=3, k5=4, k6=4,...
89 89
  // i.e. k(i)=floor((i+3)/2).  (the 'i' in k(i) means 'blur taking into account the present pixel and 'i' pixels

Also available in: Unified diff