diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-09-06 20:14:49 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2019-09-12 04:13:02 +0300 |
commit | 2b36ebb45748a8fe3eeafa7f11007350fc3bbcae (patch) | |
tree | 9aac7aa4476a9436492eebb94491ef64d0542f24 /source | |
parent | f02e64556f3fb9126050bc91f56caebe6a473f72 (diff) |
EEVEE: Fix Ambient Occlusion on backfaces
N is already the Facing normal! Dummy!
Diffstat (limited to 'source')
-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. */ |