2022-12-28 20:31:08 +00:00
|
|
|
#version 450
|
|
|
|
|
2024-06-06 05:47:06 +00:00
|
|
|
layout (local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
2022-12-28 20:31:08 +00:00
|
|
|
layout (set = 1, binding = 0, rgba8) uniform writeonly image2D outImage;
|
2024-06-06 05:47:06 +00:00
|
|
|
layout (set = 2, binding = 0) uniform UBO
|
2022-12-28 20:31:08 +00:00
|
|
|
{
|
2024-06-06 05:47:06 +00:00
|
|
|
float time;
|
2022-12-28 20:31:08 +00:00
|
|
|
} ubo;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2024-06-06 05:47:06 +00:00
|
|
|
vec2 size = imageSize(outImage);
|
2022-12-28 20:31:08 +00:00
|
|
|
vec2 coord = gl_GlobalInvocationID.xy;
|
2024-06-06 05:47:06 +00:00
|
|
|
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));
|
2022-12-28 20:31:08 +00:00
|
|
|
}
|