1#version 450 2layout(local_size_x = 1) in; 3 4layout(set = 0, binding = 0, r32ui) uniform uimage2D uImage; 5layout(set = 0, binding = 1) uniform sampler2D uTexture; 6 7layout(set = 0, binding = 2) buffer SSBO 8{ 9 vec4 outdata; 10}; 11 12void main() 13{ 14 uint ret = imageAtomicAdd(uImage, ivec2(gl_GlobalInvocationID.xy), 10u); 15 outdata = textureLod(uTexture, vec2(gl_GlobalInvocationID.xy), 0.0) + float(ret); 16} 17