diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-06-04 19:39:48 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-06-04 19:42:50 +0300 |
commit | 4ddc8403148f3d2e7a2d1385328cf64429c48f2b (patch) | |
tree | abc539fa1d0fe2a1b64b86f89125728a92802c96 /source/blender/draw/engines/eevee/shaders | |
parent | 942a748d5d5d3d03c09ae2b0b0767f1b1eb16147 (diff) |
Fix T65378 Eevee: Glitches in ESM shadowmapping
This happen to be a NaN caused by an infinite sum in the shadow
copy shader.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/shadow_copy_frag.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/shadow_copy_frag.glsl b/source/blender/draw/engines/eevee/shaders/shadow_copy_frag.glsl index dd24288b4b9..54f7dc10222 100644 --- a/source/blender/draw/engines/eevee/shaders/shadow_copy_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/shadow_copy_frag.glsl @@ -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; } |