fix compile error when temporal upscaling was enabled

This commit is contained in:
Xonk
2026-07-14 01:35:23 -04:00
parent addf795e42
commit 3c3ca17a24
+6 -2
View File
@@ -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;
@@ -355,7 +355,11 @@ vec4 computeTAA(vec2 texcoord, bool hand){
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
#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.