Triforce v0.3.6

This commit is contained in:
ruckus7382sfgsgdf
2026-11-14 00:33:23 -06:00
parent 2f1e350320
commit a02bcb21a9
106 changed files with 7683 additions and 1422 deletions

View File

@@ -10,6 +10,8 @@
// taken back to clip space and through pc.reproject (this frame's jittered clip space to the frame before's without its
// jitter: dlss_math.h). The camera's motion only, as #841's before its actor motion: what moves by itself gets the motion
// of what is behind it. pc.flags bit 0: motion (none on the first frame of a history)
// pc.flags bit 2 (FSR before the game's bloom and tone mapping, vk_temporal.cpp temporal_pre_tonemap): the scene is its
// colour target itself, linear HDR light: taken as it is, nothing clamped at 1 (the passes are compiled for HDR colour).
// The game's clip space: depth from -1 to 1 (NVN's default), y up, the picture's rows top down.
layout(local_size_x = 8, local_size_y = 8) in;
layout(binding = 0) uniform sampler2D scene;
@@ -30,7 +32,7 @@ void main() {
const vec2 uv = (vec2(g) + 0.5) / size;
vec3 c = textureLod(scene, uv, 0.0).rgb;
c = mix(c, vec3(0.0), isnan(c));
imageStore(color, g, vec4(clamp(c, 0.0, 1.0), 1.0));
imageStore(color, g, vec4((pc.flags & 4) != 0 ? min(max(c, vec3(0.0)), vec3(64000.0)) : clamp(c, 0.0, 1.0), 1.0));
const float d = textureLod(scene_depth, uv, 0.0).r;
imageStore(depth, g, vec4((pc.flags & 2) != 0 ? 1.0 - d : d));
vec2 mv = vec2(0.0);