Project

General

Profile

« Previous | Next » 

Revision 95c441a2

Added by Leszek Koltunski about 7 years ago

Progress with Multiblur.

This introduces some regressions with transparency (see: 'Different Bitmaps' and 'Around the world' )

View differences:

src/main/java/org/distorted/library/DistortedEffects.java
230 230
// DEBUG ONLY
231 231

  
232 232
  @SuppressWarnings("unused")
233
  private void displayBoundingRect(float halfX, float halfY, float halfZ, DistortedOutputSurface surface, float[] mvp, float[] vertices)
233
  private void displayBoundingRect(float halfX, float halfY, float halfZ, DistortedOutputSurface surface, float[] mvp, float[] vertices, long currTime)
234 234
    {
235 235
    int len  = vertices.length/3;
236 236
    int minx = Integer.MAX_VALUE;
......
264 264
      }
265 265

  
266 266
    mDebugProgram.useProgram();
267
    surface.setAsOutput();
267
    surface.setAsOutput(currTime);
268 268

  
269 269
    Matrix.setIdentityM( mTmpMatrix, 0);
270 270
    Matrix.translateM  ( mTmpMatrix, 0, minx-surface.mWidth/2, maxy-surface.mHeight/2, -surface.mDistance);
......
286 286
    return mP.mNumEffects==0 ? null : mP.mMainBuffer;
287 287
    }
288 288

  
289
///////////////////////////////////////////////////////////////////////////////////////////////////
290

  
291
  int postprocessPriv(long currTime, DistortedOutputSurface surface)
292
    {
293
    return mP.postprocess(currTime,surface);
294
    }
295

  
289 296
///////////////////////////////////////////////////////////////////////////////////////////////////
290 297

  
291 298
  void drawPriv(float halfW, float halfH, MeshObject mesh, DistortedOutputSurface surface, long currTime)
......
293 300
    mM.compute(currTime);
294 301
    mV.compute(currTime);
295 302
    mF.compute(currTime);
296
    mP.compute(currTime);
297 303

  
298 304
    float halfZ = halfW*mesh.zFactor;
299 305
    GLES30.glViewport(0, 0, surface.mWidth, surface.mHeight);
300 306

  
301 307
    mMainProgram.useProgram();
302 308
    GLES30.glUniform1i(mMainTextureH, 0);
303
    surface.setAsOutput();
309
    surface.setAsOutput(currTime);
304 310
    mM.send(surface,halfW,halfH,halfZ);
305 311
    mV.send(halfW,halfH,halfZ);
306 312
    mF.send(halfW,halfH);

Also available in: Unified diff