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

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;
}