Fix #112211: Workbench: Clamp infinite inputs in TAA

This commit is contained in:
Miguel Pozo
2023-09-12 16:27:40 +02:00
parent 12f8f926b2
commit 443254b1a6

View File

@@ -11,8 +11,11 @@ void main()
int i = 0;
for (int x = -1; x <= 1; x++) {
for (int y = -1; y <= 1; y++, i++) {
vec4 color = texture(colorBuffer, uv + vec2(x, y) * texel_size);
/* Clamp infinite inputs (See #112211). */
color = clamp(color, vec4(0.0), vec4(1e10));
/* Use log2 space to avoid highlights creating too much aliasing. */
vec4 color = log2(texture(colorBuffer, uv + vec2(x, y) * texel_size) + 0.5);
color = log2(color + 0.5);
fragColor += color * samplesWeights[i];
}