b85ab5f5ff
The Primary decoration was used by the atomic buffer, causing the texture binding to be potentially overlapping with other resources.
17 lines
397 B
Plaintext
17 lines
397 B
Plaintext
#version 450
|
|
layout(local_size_x = 1) in;
|
|
|
|
layout(set = 0, binding = 0, r32ui) uniform uimage2D uImage;
|
|
layout(set = 0, binding = 1) uniform sampler2D uTexture;
|
|
|
|
layout(set = 0, binding = 2) buffer SSBO
|
|
{
|
|
vec4 outdata;
|
|
};
|
|
|
|
void main()
|
|
{
|
|
uint ret = imageAtomicAdd(uImage, ivec2(gl_GlobalInvocationID.xy), 10u);
|
|
outdata = textureLod(uTexture, vec2(gl_GlobalInvocationID.xy), 0.0) + float(ret);
|
|
}
|