summaryrefslogtreecommitdiff
path: root/graphics/asymptote/base/shaders/count.glsl
blob: c9427714980b36d89fc6cb6f8a51b091ebce3d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifdef GPUINDEXING
layout(binding=0, std430) buffer offsetBuffer {
  uint count[];
};
#else
layout(binding=2, std430) buffer countBuffer {
  uint count[];
};
#endif

uniform uint width;

void main()
{
  atomicAdd(count[uint(gl_FragCoord.y)*width+uint(gl_FragCoord.x)],1u);
  discard;
}