Revision 27cd6b98
Added by Leszek Koltunski about 6 years ago
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
43 | 43 |
// next describes the Region, i.e. area over which the effect is active. |
44 | 44 |
#endif // NUM_FRAGMENT>0 |
45 | 45 |
|
46 |
layout (std140,binding=0) buffer SSBO // PER-SURFACE count of transparent fragments.
|
|
46 |
layout (std430,binding=0) buffer SSBO // PER-SURFACE count of transparent fragments.
|
|
47 | 47 |
{ // Can be buffered, i.e. if we are for example |
48 | 48 |
int ssbocount[]; // triple-buffered, then surfaceID=N uses 3 |
49 | 49 |
}; // consecutive counts (N,N+1,N+2) during 3 |
... | ... | |
73 | 73 |
} |
74 | 74 |
#endif |
75 | 75 |
|
76 |
ssbocount[0]=17;
|
|
76 |
ssbocount[u_currentIndex]= 27 + u_currentIndex;
|
|
77 | 77 |
|
78 | 78 |
FRAG_COLOR = vec4(color.rgb * (1.0 + 7.0*v_Normal.z) * 0.125, color.a); |
79 | 79 |
} |
Also available in: Unified diff
SSBO: more and more works...