#version 450 | |
layout(local_size_x = 1) in; | |
layout(r32f, binding = 0) uniform readonly image2D uImageIn; | |
layout(r32f, binding = 1) uniform coherent writeonly image2D uImageOut; | |
layout(set = 0, binding = 2) readonly buffer Foo | |
{ | |
float foo; | |
}; | |
layout(set = 0, binding = 3) coherent writeonly buffer Bar | |
{ | |
float bar; | |
}; | |
void main() | |
{ | |
ivec2 coord = ivec2(9, 7); | |
vec4 indata = imageLoad(uImageIn, coord); | |
imageStore(uImageOut, coord, indata); | |
bar = foo; | |
} | |