Project

General

Profile

« Previous | Next » 

Revision 7170e4eb

Added by Leszek Koltunski almost 7 years ago

Move on to Stencil on both stages of the BLUR + separate 'blit with depth'.

This works wonders on Nexus 5X ( r=50 quality=HIGHIEST 1,4,8 cubes: 59.3,43.6,41.0 FPS! ) but it somehow fails to clear the DEPTH and STENCIL buffers on Nexus 4....

View differences:

src/main/java/org/distorted/library/DistortedNode.java
271 271
      float w = mSurface.getWidth() /2.0f;
272 272
      float h = mSurface.getHeight()/2.0f;
273 273

  
274
      // Actually draw our object.
274
      // Draw the color buffer of the object.
275 275
      buffer1.setAsOutput();
276 276
      mState.apply();
277 277
      mEffects.drawPriv(w, h, mMesh, buffer1, currTime, 0);
278 278

  
279
      // Mark area of our object + marginInPixels pixels around with 1s in Stencil buffer
279
      // Draw stencil + depth buffers of the object enlarged by HALO pixels around.
280 280
      buffer2.setAsOutput();
281 281
      DistortedRenderState.setUpStencilMark();
282 282
      mEffects.drawPriv(w, h, mMesh, buffer2, currTime, effects.getHalo()*buffer2.mMipmap);

Also available in: Unified diff