diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-09-05 10:10:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-09-05 10:12:12 +0300 |
commit | b0d9b6f6df230dce727200cb9909da7638d6caba (patch) | |
tree | 6e43d61b56cdd69be3d782e77642dd1c514ac5dd /source/blender/draw/engines/eevee/shaders | |
parent | a631dc55756b9c1a9835bf5b06f5d57f388f1277 (diff) |
Fix T100788 Regression: EEVEE wrong normal map on backfaces
This was caused by rB07cf3ce92fa2. It was missing a sign flip.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/surface_lib.glsl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/surface_lib.glsl b/source/blender/draw/engines/eevee/shaders/surface_lib.glsl index b984a6df7b3..69762027643 100644 --- a/source/blender/draw/engines/eevee/shaders/surface_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/surface_lib.glsl @@ -110,6 +110,7 @@ GlobalData init_globals(void) surf.barycentric_coords = vec2(0.0); surf.barycentric_dists = vec3(0.0); surf.N = (FrontFacing) ? surf.N : -surf.N; + surf.Ni = (FrontFacing) ? surf.Ni : -surf.Ni; # ifdef HAIR_SHADER vec3 V = cameraVec(surf.P); /* Shade as a cylinder. */ |