Fix T65378 Eevee: Glitches in ESM shadowmapping

This happen to be a NaN caused by an infinite sum in the shadow
copy shader.
This commit is contained in:
Clément Foucault 2019-06-04 18:39:48 +02:00
parent 942a748d5d
commit 4ddc840314
Notes: blender-bot 2023-02-14 06:00:47 +01:00
Referenced by issue #65378, Sun light with default ESM (Exponential Shadow Mapping) glitches
1 changed files with 2 additions and 2 deletions

View File

@ -194,6 +194,6 @@ void main()
#ifdef ESM
accum = ln_space_prefilter_finalize(ref, accum);
#endif
FragColor = vec2(accum).xyxy;
/* Clamp infinite sum. */
FragColor = vec2(clamp(accum, 0.0, 1e16)).xyxy;
}