9cafea6cf8
This was not added when Epic contributed atomic image support. Fixes #1484.
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);
|
|
}
|