mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-20 00:29:57 -04:00
Triforce v0.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
17
gpu/vk/shaders/dlss_out.comp
Normal file
17
gpu/vk/shaders/dlss_out.comp
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 450
|
||||
// (hookshot) NVIDIA DLSS's picture into OoT's gameplay upscale's output (vk_dlss.cpp): what the network's own output
|
||||
// does, the square of its perceptual encoding (linear colour again). DLAA's picture is at the render size: scaled up to the
|
||||
// output's with the sampler's linear filter.
|
||||
layout(local_size_x = 8, local_size_y = 8) in;
|
||||
layout(binding = 0) uniform sampler2D src;
|
||||
layout(binding = 1, r11f_g11f_b10f) 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;
|
||||
vec3 c = all(equal(textureSize(src, 0), pc.size)) ? texelFetch(src, g, 0).rgb
|
||||
: textureLod(src, (vec2(g) + 0.5) / vec2(pc.size), 0.0).rgb;
|
||||
c = max(c, vec3(0.0));
|
||||
c *= c;
|
||||
imageStore(dst, g, vec4(c, 1.0));
|
||||
}
|
||||
Reference in New Issue
Block a user