summaryrefslogtreecommitdiff
path: root/graphics/asymptote/base/shaders/count.glsl
blob: bd06331d77032f88fb9435b89faf97b95493a0fc (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
#else
#ifdef GPUINDEXING
layout(binding=0, std430) buffer offsetBuffer
#else
layout(binding=2, std430) buffer countBuffer
#endif
#endif
{
  uint index[];
};

uniform uint width;

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