SPIRV-Cross/shaders/comp/image.comp

13 lines
358 B
Plaintext
Raw Normal View History

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