#[compute]
#version 450

layout( local_size_x = 8, local_size_y = 8, local_size_z = 1 ) in;


layout( rgba16, set = 0, binding = 0 ) 
uniform restrict writeonly image2D outputImage;

layout( push_constant, std430 ) 
uniform Parameters 
{
  float r;
  float g;
  float b;
  float a;

} parameters;

void main() 
{
  ivec2 size = imageSize( outputImage );
	ivec2 xy = ivec2( gl_GlobalInvocationID.xy );

  if ( any( greaterThanEqual( xy, size ) )  ) 
  {
    return;
  }

	vec4 color = vec4( parameters.r, parameters.g, parameters.b, parameters.a );

	imageStore( outputImage, xy, color );
}
