diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-09-06 20:14:49 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-09-06 20:15:15 +0300 |
commit | 7cec119c576b6754f6d824789877393194e3a2eb (patch) | |
tree | 073308209332de461baa3962176fae98ec5ffc51 /source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | |
parent | 5289b16d775d3bddd2815f24d56a5eccc53f0c75 (diff) |
EEVEE: Fix Ambient Occlusion on backfaces
N is already the Facing normal! Dummy!
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl index e9bdfec008f..f55b42eb148 100644 --- a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl @@ -453,7 +453,7 @@ void CLOSURE_NAME(vec3 N N = -N; } vec3 bent_normal; - float final_ao = occlusion_compute(gl_FrontFacing ? N : -N, viewPosition, ao, rand, bent_normal); + float final_ao = occlusion_compute(N, viewPosition, ao, rand, bent_normal); if (!use_contact_shadows) { N = -N; /* Bypass bent normal. */ |