Files
Triforce-Source/gpu/vk/shaders/movie_upscale.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
699 B
Plaintext

#version 450
// (hookshot) The movie upscaler's last pass, on cards that leave the networks out: its input sampled linearly into its output. A shader and not a
// blit: an AMD card showed a blit of this image as black, while the network's own sampling and storing of the same two images works there.
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 size; } pc;
void main() {
const ivec2 g = ivec2(gl_GlobalInvocationID.xy);
if (any(greaterThanEqual(g, pc.size))) return;
imageStore(dst, g, textureLod(src, (vec2(g) + 0.5) / vec2(pc.size), 0.0));
}