EEVEE: Fix Ambient Occlusion on backfaces

N is already the Facing normal! Dummy!
This commit is contained in:
Clément Foucault 2019-09-06 19:14:49 +02:00
parent 5289b16d77
commit 7cec119c57
Notes: blender-bot 2023-02-14 03:46:57 +01:00
Referenced by issue #69596, Grease Pencil Fade Layers Overlay sometimes not respecting main Overlay flag
Referenced by issue #69597, Changing Grease Pencil Layer in Dopesheet unlocks all layers
Referenced by issue #69599, Grease Pencil: Changing Active Layer via Dopesheet sometimes doesn't update Fade Layers overlay
Referenced by issue #69585, Master/Eevee: This materials looks dark and depends on normal direction
1 changed files with 1 additions and 1 deletions

View File

@ -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. */