Eevee: Bloom: fix black bloom artifacts.

This commit is contained in:
Clément Foucault 2017-06-27 05:17:42 +02:00
parent 62b1d11613
commit c218d4b008
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ vec4 step_blit(void)
/* Combine and apply the brightness response curve. */
m *= max(rq, br - curveThreshold.w) / max(br, 1e-5);
/* Clamp to avoid black square artifacts if a pixel goes NaN. */
clamp(m, vec3(0.0), vec3(1e20)); /* 1e20 arbitrary. */
return vec4(m, 1.0);
}