Project

General

Profile

« Previous | Next » 

Revision c207da02

Added by Leszek Koltunski almost 6 years ago

OIT: fixes. Everything looks correct now except for the curious return of the 'dancing lower-left corner' small glitch in the 'Transparency' app.

View differences:

src/main/java/org/distorted/library/main/DistortedOutputSurface.java
293 293
///////////////////////////////////////////////////////////////////////////////////////////////////
294 294
// two phases: 1. collapse the SSBO 2. blend the ssbo's color
295 295

  
296
  private int oitRender(long currTime, DistortedOutputSurface buffer)
296
  private int oitRender(long currTime)
297 297
    {
298
    float corrW = buffer.getWidthCorrection();
299
    float corrH = buffer.getHeightCorrection();
298
    float corrW = getWidthCorrection();
299
    float corrH = getHeightCorrection();
300 300

  
301 301
    GLES31.glViewport(0, 0, mWidth, mHeight);
302
    setAsOutput(currTime);
302
    GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, 0);
303 303
    GLES31.glActiveTexture(GLES31.GL_TEXTURE1);
304
    GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, buffer.mDepthStencilH[0]);
304
    GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, mDepthStencilH[0]);
305 305

  
306 306
    DistortedRenderState.switchOffColorDepthStencil();
307 307
    DistortedEffects.oitCollapse(this, corrW, corrH );
308 308

  
309
    GLES31.glActiveTexture(GLES31.GL_TEXTURE1);
310 309
    GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, 0);
311 310

  
311
    setAsOutput(currTime);
312 312
    DistortedRenderState.switchColorDepthOnStencilOff();
313 313
    DistortedEffects.oitRender(this, corrW, corrH);
314 314
    DistortedRenderState.restoreColorDepthStencil();
......
420 420
          numRenders += currQueue.postprocess(mBuffer);
421 421
          numRenders += oitBuild(mBuffer[quality]);
422 422
          GLES31.glMemoryBarrier(GLES31.GL_SHADER_STORAGE_BARRIER_BIT);
423
          numRenders += oitRender(time,this);  // merge the OIT linked list
423
          numRenders += oitRender(time);  // merge the OIT linked list
424 424
          clearBuffer(mBuffer[quality]);
425 425
          }
426 426
        } // end else (postprocessed child)

Also available in: Unified diff