rj-action-library/Runtime/Rendering/RenderGraph/Nodes/Processors/Copy/Copy.glsl

26 lines
592 B
Plaintext
Raw Normal View History

2025-04-24 13:39:00 +00:00
#[compute]
#version 450
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
layout(rgba16, set = 0, binding = 0)
uniform restrict readonly image2D inputImage;
layout(rgba16, set = 1, binding = 0)
uniform restrict writeonly image2D outputImage;
void main()
{
2025-04-29 19:46:45 +00:00
ivec2 imgSize = imageSize( inputImage );
2025-04-24 13:39:00 +00:00
ivec2 currentPosition = ivec2( gl_GlobalInvocationID.xy );
2025-04-29 19:46:45 +00:00
if ( any( greaterThanEqual( currentPosition, imgSize ) ) )
{
return;
}
vec4 currentPixel = imageLoad( inputImage, currentPosition );
2025-04-24 13:39:00 +00:00
imageStore( outputImage, currentPosition, currentPixel );
}