Project

General

Profile

« Previous | Next » 

Revision c1a38ba3

Added by Leszek Koltunski almost 6 years ago

Progress with non-postprocessed OIT.

Status: compiles, but fails to work on both Adreno and Mali. Crashes the app (Adreno) or the whole system (Mali)

View differences:

src/main/java/org/distorted/library/main/DistortedOutputSurface.java
395 395
    EffectQueuePostprocess lastQueue=null, currQueue;
396 396
    long lastBucket=0, currBucket;
397 397

  
398
    if( oit && numChildren>0 )
399
      {
400
      oitClear(this);
401
      }
402

  
398 403
    for(int i=0; i<numChildren; i++)
399 404
      {
400 405
      child1 = children.get(i);
......
404 409
      if( currBucket==0 )
405 410
        {
406 411
        setAsOutputFBO(time,fbo);
407
        numRenders += child1.draw(time,this);
412

  
413
        if( oit )
414
          {
415
          numRenders += child1.drawOIT(time, this);
416
          GLES31.glMemoryBarrier(GLES31.GL_SHADER_STORAGE_BARRIER_BIT | GLES31.GL_ATOMIC_COUNTER_BARRIER_BIT);
417
          }
418
        else
419
          {
420
          numRenders += child1.draw(time, this);
421
          }
408 422
        }
409 423
      else
410 424
        {
......
415 429
          if( lastBucket==0 )
416 430
            {
417 431
            clonePostprocessingViewport(this);
418

  
419
            if( oit )
420
              {
421
              oitClear(this);
422
              }
423 432
            }
424 433
          else
425 434
            {
......
467 476
            {
468 477
            numRenders += oitBuild(time, mBuffer[quality], fbo);
469 478
            GLES31.glMemoryBarrier(GLES31.GL_SHADER_STORAGE_BARRIER_BIT | GLES31.GL_ATOMIC_COUNTER_BARRIER_BIT);
470
            numRenders += oitRender(time, fbo);  // merge the OIT linked list
471 479
            mBuffer[quality].clearBuffer(fbo);
472 480
            }
473 481
          else
......
481 489
      lastBucket= currBucket;
482 490
      } // end main for loop
483 491

  
492
    if( oit && numChildren>0 )
493
      {
494
      numRenders += oitRender(time, fbo);  // merge the OIT linked list
495
      }
496

  
484 497
    return numRenders;
485 498
    }
486 499

  

Also available in: Unified diff