Revision c207da02
Added by Leszek Koltunski almost 6 years ago
src/main/res/raw/oit_collapse_fragment_shader.glsl | ||
---|---|---|
50 | 50 |
const float S= 2147483647.0; |
51 | 51 |
float depth = texture(u_DepthTexture, v_TexCoordinate).r; |
52 | 52 |
uint texdepth = uint(S*(1.0-depth)/2.0); |
53 |
uint linkedlistdepth = u_Records[curr+1u]; |
|
54 | 53 |
|
55 |
while( curr != 0u && linkedlistdepth > texdepth )
|
|
54 |
while( curr != 0u ) |
|
56 | 55 |
{ |
56 |
if( u_Records[curr+1u] <= texdepth ) |
|
57 |
{ |
|
58 |
u_Records[prev] = 0u; |
|
59 |
break; |
|
60 |
} |
|
61 |
|
|
57 | 62 |
prev = curr; |
58 | 63 |
curr = u_Records[curr]; |
59 |
linkedlistdepth = u_Records[curr+1u]; |
|
60 |
} |
|
61 |
|
|
62 |
if( curr != 0u ) |
|
63 |
{ |
|
64 |
u_Records[prev] = 0u; |
|
65 | 64 |
} |
66 | 65 |
} |
67 | 66 |
else discard; |
Also available in: Unified diff
OIT: fixes. Everything looks correct now except for the curious return of the 'dancing lower-left corner' small glitch in the 'Transparency' app.