From 3c3ca17a24c8105c9b45a2a57e62eee5d3dabce7 Mon Sep 17 00:00:00 2001 From: Xonk Date: Tue, 14 Jul 2026 01:35:23 -0400 Subject: [PATCH] fix compile error when temporal upscaling was enabled --- shaders/dimensions/composite5.fsh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/shaders/dimensions/composite5.fsh b/shaders/dimensions/composite5.fsh index 413ee78..cabdeb8 100644 --- a/shaders/dimensions/composite5.fsh +++ b/shaders/dimensions/composite5.fsh @@ -317,8 +317,8 @@ vec4 computeTAA(vec2 texcoord, bool hand){ #if TAA_MODE == 3 // Interpolating neighboorhood clampling boundaries between pixels - vec3 colMax = texture(colortex0, adjTC).rgb; - vec3 colMin = texture(colortex6, adjTC).rgb; + vec3 colMax = texture(colortex0, adjTC_noJitter).rgb; + vec3 colMin = texture(colortex6, adjTC_noJitter).rgb; #else //Assuming the history color is a blend of the 3x3 neighborhood, we clamp the history to the min and max of each channel in the 3x3 neighborhood vec3 col0 = texture(colortex3, adjTC_noJitter).rgb; @@ -353,9 +353,13 @@ vec4 computeTAA(vec2 texcoord, bool hand){ vec3 frameHistory = max(FastCatmulRom(colortex5, previousPosition.xy, vec4(texelSize, 1.0/texelSize), 0.75).xyz,1e-7); vec3 clampedframeHistory = clamp(frameHistory, colMin, colMax); - + // return the first moments instead of history if the difference across frames in the neighborhood is enough for it. helps reduces ghosting without looking too grainy/flickery - clampedframeHistory = mix(clampedframeHistory, momentsA, clamp(abs(clampedframeHistory - frameHistory)/clampedframeHistory,0.0,1.0)); + #if TAA_MODE == 3 + clampedframeHistory = mix(clampedframeHistory, currentFrame, clamp(abs(clampedframeHistory - frameHistory)/clampedframeHistory,0.0,1.0)); + #else + clampedframeHistory = mix(clampedframeHistory, momentsA, clamp(abs(clampedframeHistory - frameHistory)/clampedframeHistory,0.0,1.0)); + #endif float blendingFactor = BLEND_FACTOR; // reduce history usage if the camera moves to reduce artifacts in motion.