Revision 2faad666
Added by Leszek Koltunski about 6 years ago
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
78 | 78 |
} |
79 | 79 |
#endif |
80 | 80 |
|
81 |
if( color.a < 1.0 && color.a > 0.0 ) ssbocount[u_currentIndex]++;
|
|
81 |
if( color.a < 1.0 && color.a > 0.0 ) atomicAdd(ssbocount[u_currentIndex],1);
|
|
82 | 82 |
|
83 | 83 |
FRAG_COLOR = vec4(color.rgb * (1.0 + 7.0*v_Normal.z) * 0.125, color.a); |
84 | 84 |
} |
Also available in: Unified diff
SSBO: now we have a more-or-less correct running average of the count of transparent fragments over the last few frames.