28 lines
595 B
GLSL
28 lines
595 B
GLSL
#version 460
|
|
|
|
#extension GL_EXT_buffer_reference : require
|
|
#extension GL_GOOGLE_include_directive : require
|
|
|
|
#include "structures.layout"
|
|
|
|
layout (local_size_x = 16, local_size_y = 16) in;
|
|
|
|
void main()
|
|
{
|
|
ivec2 texel_coord = ivec2(gl_GlobalInvocationID.xy);
|
|
ivec2 size = imageSize(DrawImage);
|
|
|
|
if (texel_coord.x < size. x && texel_coord.y < size.y)
|
|
{
|
|
vec4 color = vec4(0.0);
|
|
|
|
if (gl_GlobalInvocationID.x != 0 && gl_LocalInvocationID.y != 0)
|
|
{
|
|
color.x = float(texel_coord.x) / size.x;
|
|
color.y = float(texel_coord.y) / size.y;
|
|
}
|
|
|
|
imageStore(DrawImage, texel_coord, color);
|
|
}
|
|
}
|