MoonWorksGraphicsTests/MoonWorks.Test.Common/Content/Shaders/Source/FillTextureCompute.comp

18 lines
434 B
Plaintext
Raw Normal View History

2022-11-12 23:20:02 +00:00
#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;
void main()
{
ivec2 coord = ivec2(gl_GlobalInvocationID.xy);
vec3 totalWorkgroupSize = gl_NumWorkGroups * gl_WorkGroupSize;
vec4 col = vec4(
float(coord.x) / totalWorkgroupSize.x,
float(coord.y) / totalWorkgroupSize.y,
1.0,
1.0
);
imageStore(outImage, coord, col);
}