diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-03 05:17:22 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-05 03:59:14 +0300 |
commit | c8e87edccbd0f7dfba33db8f792e9b1182e41de4 (patch) | |
tree | 778cc3ff69cc123c5a29ba8b2e6edb0a5b185a96 | |
parent | f61bcc70e111fdcaa9aa6df963322df6d2e2a2fd (diff) |
Eevee: Render: Fix Ao pass background contamination.
It was poluted by the additive blend mode.
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_gtao_frag.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_gtao_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_gtao_frag.glsl index 32edf709d88..b7bcf5c8a8b 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_gtao_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_gtao_frag.glsl @@ -28,7 +28,8 @@ void main() gtao_deferred(normal, viewPosition, noise, depth, visibility, bent_normal); - FragColor = vec4(visibility); + /* Handle Background case. Prevent artifact due to uncleared Horizon Render Target. */ + FragColor = vec4((depth == 1.0) ? 0.0 : visibility); } #else |