SPIRV-Cross/reference/shaders/comp/image.comp

13 lines
394 B
Plaintext
Raw Normal View History

2016-03-02 17:09:16 +00:00
#version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
2017-08-29 13:52:59 +00:00
layout(binding = 0, rgba8) uniform readonly mediump image2D uImageIn;
layout(binding = 1, rgba8) uniform writeonly mediump image2D uImageOut;
2016-03-02 17:09:16 +00:00
void main()
{
vec4 v = imageLoad(uImageIn, ivec2(gl_GlobalInvocationID.xy) + imageSize(uImageIn));
2016-03-02 17:09:16 +00:00
imageStore(uImageOut, ivec2(gl_GlobalInvocationID.xy), v);
}