Revision b36613d8
Added by Leszek Koltunski about 6 years ago
src/main/res/raw/blit_depth_render_fragment_shader.glsl | ||
---|---|---|
60 | 60 |
uint curr = u_Records[index]; |
61 | 61 |
|
62 | 62 |
if (curr == 0u) discard; |
63 |
else |
|
64 |
{ |
|
65 |
u_Records[index] = 0u; |
|
63 | 66 |
|
64 |
vec4 color= vec4(0.0,0.0,0.0,0.0);
|
|
65 |
u_Records[index] = 0u;
|
|
67 |
vec4 color= vec4(0.0,0.0,1.0,1.0);//convert(u_Records[curr+2u]);
|
|
68 |
curr = u_Records[curr];
|
|
66 | 69 |
|
67 |
while (curr > 0u) |
|
68 |
{ |
|
69 |
color= blend( color, convert(u_Records[curr+2u]) ); // keep walking the linked list
|
|
70 |
curr = u_Records[curr]; // and blending the colors in |
|
71 |
} |
|
70 |
while (curr > 0u)
|
|
71 |
{
|
|
72 |
color= vec4(0.0,0.0,0.0,1.0);//blend( color, convert(u_Records[curr+2u]) ); // keep walking the linked list
|
|
73 |
curr = u_Records[curr]; // and blending the colors in
|
|
74 |
}
|
|
72 | 75 |
|
73 |
gl_FragDepth = texture(u_DepthTexture, v_TexCoordinate).r; |
|
74 |
fragColor = color; |
|
76 |
gl_FragDepth = texture(u_DepthTexture, v_TexCoordinate).r; |
|
77 |
fragColor = color; |
|
78 |
} |
|
75 | 79 |
} |
Also available in: Unified diff
small correction for blending OIT colors.