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

uniform uint width;

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