diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-10-08 19:23:45 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-10-08 19:23:45 +0300 |
commit | abcda06934aba054de8540b66b13c2bbc5f8f515 (patch) | |
tree | 644eefe65e7036d39ba823ba1b917610d0edc7be /source/blender/draw/engines/eevee/shaders/lamps_lib.glsl | |
parent | f7db1a4366e8391aea87cc39a5e7bfd6141dd283 (diff) |
Eevee: Fix bad defines for volumetric shadowing
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lamps_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lamps_lib.glsl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lamps_lib.glsl b/source/blender/draw/engines/eevee/shaders/lamps_lib.glsl index a39f04d47af..c879e9c37f3 100644 --- a/source/blender/draw/engines/eevee/shaders/lamps_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/lamps_lib.glsl @@ -144,7 +144,12 @@ float shadow_cascade(ShadowData sd, ShadowCascadeData scd, float texid, vec3 W) /* ----------------------------------------------------------- */ #define MAX_MULTI_SHADOW 4 -float light_visibility(LightData ld, vec3 W, vec3 viewPosition, vec3 viewNormal, vec4 l_vector) +float light_visibility(LightData ld, vec3 W, +#ifndef VOLUMETRICS + vec3 viewPosition, + vec3 viewNormal, +#endif + vec4 l_vector) { float vis = 1.0; @@ -186,7 +191,6 @@ float light_visibility(LightData ld, vec3 W, vec3 viewPosition, vec3 viewNormal, data.sh_tex_start, W); // } } -#endif #ifndef VOLUMETRICS /* Only compute if not already in shadow. */ @@ -215,6 +219,7 @@ float light_visibility(LightData ld, vec3 W, vec3 viewPosition, vec3 viewNormal, return mix(0.0, vis, dist_ratio * dist_ratio * dist_ratio); } } +#endif } #endif |