Project

General

Profile

« Previous | Next » 

Revision 2aef1f4d

Added by Leszek Koltunski almost 6 years ago

OIT: fixes for Mali: fix a broken loop in the oitRender fragment shader that resulted in flashing.

View differences:

src/main/java/org/distorted/library/main/DistortedOutputSurface.java
214 214

  
215 215
///////////////////////////////////////////////////////////////////////////////////////////////////
216 216
// The postprocessing buffers mBuffer[] are generally speaking too large (there's just one static
217
// set of them) so before we use them for output, we need to adjust the Vieport as if they were
217
// set of them) so before we use them for output, we need to adjust the Viewport as if they were
218 218
// smaller. That takes care of outputting pixels to them. When we use them as input, we have to
219 219
// adjust the texture coords - see the get{Width|Height}Correction functions.
220 220

  
......
367 367
    EffectQueuePostprocess lastQueue=null, currQueue;
368 368
    long lastBucket=0, currBucket;
369 369

  
370
    oitClear(this);
371

  
372 370
    for(int i=0; i<numChildren; i++)
373 371
      {
374 372
      child1 = children.get(i);
......
389 387
          if( lastBucket==0 )
390 388
            {
391 389
            clonePostprocessingViewport(this);
390
            oitClear(this);
392 391
            }
393 392
          else
394 393
            {
src/main/res/raw/oit_render_fragment_shader.glsl
67 67
    const float S= 2147483647.0;
68 68
    gl_FragDepth = 1.0 - 2.0*float(u_Records[curr+1u])/S;
69 69
    vec4 color   = convert(u_Records[curr+2u]);
70
    curr = u_Records[curr];
70 71

  
71 72
    while (curr != 0u)
72 73
      {
73
      curr = u_Records[curr];
74 74
      color = blend( color , convert(u_Records[curr+2u]) );
75
      curr = u_Records[curr];
75 76
      }
76 77

  
77 78
    fragColor = color;

Also available in: Unified diff