I'm using OpenGL 4.3 to use Compute Shaders. I'm running into trouble. Can anyone spot the problem?
#version 430
layout(local_size_x = 1, local_size_y = 1) in;
layout(rgba32f, binding = 0) uniform image2D img_output;
// see: http://antongerdelan.net/opengl/compute.html
void main()
{
vec4 pixel = vec4(0.0, 0.5, 0.0, 1.0);
ivec2 dims = imageSize(img_output); // fetch image dimensions
ivec2 pixel_coords = ivec2(gl_GlobalInvocationID.xy);
float x = float(pixel_coords.x)/float(dims.x);
float y = float(pixel_coords.y)/float(dims.y);
pixel.r = x;
pixel.g = y;
pixel.b = 0;
pixel.a = 1;
imageStore(img_output, pixel_coords, pixel);
}