mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
13 lines
606 B
Plaintext
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));
|
|
}
|