mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-11-26 22:27:06 +08:00
20 lines
661 B
Plaintext
20 lines
661 B
Plaintext
#version 440
|
|
|
|
layout(local_size_x = 16, local_size_y = 16) in;
|
|
layout(rgba8, binding = 1) readonly uniform image2D inputImage;
|
|
layout(rgba16f, binding = 2) writeonly uniform image2D outputImage;
|
|
|
|
// There is no equivalent of gl_NumWorkGroups in HLSL. So instead pass the
|
|
// values in in a uniform buffer.
|
|
layout(std140, binding = 0) uniform numWorkGroupsBuf {
|
|
uvec3 numWorkGroups;
|
|
};
|
|
|
|
void main()
|
|
{
|
|
if (gl_GlobalInvocationID.x >= numWorkGroups.x || gl_GlobalInvocationID.y >= numWorkGroups.y)
|
|
return;
|
|
vec4 value = imageLoad(inputImage, ivec2(gl_GlobalInvocationID.xy));
|
|
imageStore(outputImage, ivec2(gl_GlobalInvocationID.xy), value);
|
|
}
|