#version 450

layout (local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
layout (set = 1, binding = 0, rgba8) uniform writeonly image2D outImage;
layout (set = 2, binding = 0) uniform UBO
{
	float time;
} ubo;

void main()
{
    vec2 size = imageSize(outImage);
	vec2 coord = gl_GlobalInvocationID.xy;
    vec2 uv = coord / size;

    vec3 col = 0.5 + 0.5*cos(ubo.time + uv.xyx + vec3(0, 2, 4));

    imageStore(outImage, ivec2(coord), vec4(col, 1.0));
}
