Files
Triforce-Source/gpu/vk/shaders/fg_copy.comp
ruckus7382sfgsgdf 34b3683441 Triforce v0.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:32:48 -06:00

13 lines
606 B
Plaintext

#version 450
// Frame generation (vk_framegen.cpp), after the WebGPU renderer's rx_framegen.cpp: the game's frame (its crop of the
// window texture) copied, as it may be drawn over by the next one
layout(local_size_x = 8, local_size_y = 8) in;
layout(binding = 0) uniform sampler2D src;
layout(binding = 1, rgba8) uniform writeonly image2D dst;
layout(push_constant) uniform P { ivec2 offset; ivec2 size; } pc;
void main() {
const ivec2 g = ivec2(gl_GlobalInvocationID.xy);
if (any(greaterThanEqual(g, pc.size))) return;
imageStore(dst, g, vec4(texelFetch(src, g + pc.offset, 0).rgb, 1.0));
}