Eevee: Fix Contact shadows with Translucent BSDF
authorClément Foucault <foucault.clem@gmail.com>
Fri, 14 Jun 2019 13:19:28 +0000 (15:19 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Fri, 14 Jun 2019 14:20:29 +0000 (16:20 +0200)
source/blender/draw/engines/eevee/shaders/lights_lib.glsl

index cb4302d..2d14f52 100644 (file)
@@ -227,7 +227,8 @@ float light_visibility(LightData ld,
 
       vec3 ray_ori = viewPosition;
 
-      // vN = (gl_FrontFacing) ? vN : -vN;
+      /* Fix translucency shadowed by contact shadows. */
+      vN = (gl_FrontFacing) ? vN : -vN;
 
       if (dot(vN, ray_dir) <= 0.0) {
         return vis;