diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-06-07 14:53:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-06-07 14:53:30 +0300 |
commit | 0cfdc8d182a51e67ccd12063162fa96d4b633c16 (patch) | |
tree | 78ce900b7ee714036243249a320f73bbf0aed872 /source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl | |
parent | 873c756e5dd73b03323b83ba7e1b289296724331 (diff) |
Eevee: Try to fix NaN caused by normal maps + bentnormals
Should help with T65118.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl index acfc2af93ee..8662c0ecb6a 100644 --- a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl @@ -177,7 +177,7 @@ void integrate_slice( /* Solving inner integral */ vec2 h_2 = 2.0 * h; vec2 vd = -cos(h_2 - n) + cos_n + h_2 * sin(n); - float vis = (vd.x + vd.y) * 0.25 * n_proj_len; + float vis = saturate((vd.x + vd.y) * 0.25 * n_proj_len); visibility += vis; |