Project

General

Profile

« Previous | Next » 

Revision 638b5b5c

Added by Leszek Koltunski about 7 years ago

More MIPMAP work.

View differences:

src/main/java/org/distorted/library/DistortedEffects.java
293 293
    mF.compute(currTime);
294 294

  
295 295
    float halfZ = halfW*mesh.zFactor;
296
    GLES30.glViewport(0, 0, surface.mWidth, surface.mHeight);
296

  
297
    float mipmap = 1.0f;//surface.mMipmap;
298
    GLES30.glViewport(0, 0, (int)(mipmap*surface.mWidth), (int)(mipmap*surface.mHeight) );
299
    //GLES30.glViewport(0, 0, surface.mWidth, surface.mHeight);
297 300

  
298 301
    mMainProgram.useProgram();
299 302
    GLES30.glUniform1i(mMainTextureH, 0);
300 303
    surface.setAsOutput(currTime);
301 304
    mM.send(surface,halfW,halfH,halfZ);
305
    mM.send(surface,halfW,halfH,halfZ);
302 306
    mV.send(halfW,halfH,halfZ);
303 307
    mF.send(halfW,halfH);
304 308
    GLES30.glVertexAttribPointer(mMainProgram.mAttribute[0], POSITION_DATA_SIZE, GLES30.GL_FLOAT, false, 0, mesh.mMeshPositions);
......
317 321
    {
318 322
    mBlitProgram.useProgram();
319 323

  
320
    GLES30.glViewport(0, 0, projection.mWidth, projection.mHeight);
324
    float mipmap = 1.0f;//projection.mMipmap;
325
    GLES30.glViewport(0, 0, (int)(mipmap*projection.mWidth), (int)(mipmap*projection.mHeight) );
321 326
    GLES30.glUniform1i(mBlitTextureH, 0);
322 327
    GLES30.glUniform1f( mBlitDepthH , 1.0f-projection.mNear);
323 328
    GLES30.glVertexAttribPointer(mBlitProgram.mAttribute[0], 2, GLES30.GL_FLOAT, false, 0, mQuadPositions);

Also available in: Unified diff