Project

General

Profile

« Previous | Next » 

Revision bbe3283b

Added by Leszek Koltunski almost 6 years ago

correct oitRender again: we need to disable stencil reading and writing and restore after

View differences:

src/main/java/org/distorted/library/main/DistortedOutputSurface.java
360 360
    GLES31.glActiveTexture(GLES31.GL_TEXTURE1);
361 361
    GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, buffer.mDepthStencilH[0]);
362 362

  
363
    GLES31.glDisable(GLES31.GL_STENCIL_TEST);
364
    GLES31.glStencilMask(0x00);
365

  
363
    DistortedRenderState.disableStencil();
366 364
    DistortedEffects.oitRender(this, buffer.getWidthCorrection(), buffer.getHeightCorrection() );
365
    DistortedRenderState.restoreStencil();
367 366

  
368 367
    GLES31.glActiveTexture(GLES31.GL_TEXTURE1);
369 368
    GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, 0);
src/main/java/org/distorted/library/main/DistortedRenderState.java
233 233

  
234 234
///////////////////////////////////////////////////////////////////////////////////////////////////
235 235

  
236
  static void enableStencil()
236
  static void disableStencil()
237 237
    {
238 238
    sState.stencilTest = cState.stencilTest;
239 239

  
240
    if (cState.stencilTest != 1)
240
    if (cState.stencilTest != 0)
241 241
      {
242
      cState.stencilTest = 1;
243
      GLES31.glEnable(GLES31.GL_STENCIL_TEST);
242
      cState.stencilTest = 0;
243
      GLES31.glDisable(GLES31.GL_STENCIL_TEST);
244 244
      }
245 245

  
246 246
    sState.stencilFuncFunc = cState.stencilFuncFunc;

Also available in: Unified diff