Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-09-06 20:14:49 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-09-06 20:15:15 +0300
commit7cec119c576b6754f6d824789877393194e3a2eb (patch)
tree073308209332de461baa3962176fae98ec5ffc51
parent5289b16d775d3bddd2815f24d56a5eccc53f0c75 (diff)
EEVEE: Fix Ambient Occlusion on backfaces
N is already the Facing normal! Dummy!
-rw-r--r--source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl2
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. */