taa fixes

This commit is contained in:
luboslenco
2025-03-25 20:45:36 +01:00
parent d22ff37b1b
commit 5fcd0beabb
7 changed files with 35 additions and 12 deletions
+6 -1
View File
@@ -11,6 +11,11 @@ const tex2: tex2d;
#[set(everything)]
const tex2_sampler: sampler;
#[set(everything)]
const constants: {
taa_blend: float;
};
struct vert_in {
pos: float2;
}
@@ -31,7 +36,7 @@ fun taa_pass_vert(input: vert_in): vert_out {
fun taa_pass_frag(input: vert_out): float4 {
var current: float4 = sample_lod(tex, tex_sampler, input.tex, 0.0);
var previous: float4 = sample_lod(tex2, tex2_sampler, input.tex, 0.0);
return float4(lerp(current.rgb, previous.rgb, 0.833), 1.0);
return float4(lerp(current.rgb, previous.rgb, constants.taa_blend), 1.0);
}
#[pipe]