diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-02-07 22:42:53 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-02-07 22:46:37 +0300 |
commit | 1df2f7a7133471ea3e99888bf6a0c922b78f593a (patch) | |
tree | e82ed9656fae5f03010060445ca8a25b73b589d5 | |
parent | bb05f6d33572e3e17f5298a6e792d529e2b77cb3 (diff) |
EEVEE: Fix missing shadowing factor
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl b/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl index ad4c602f489..5527c99fbb0 100644 --- a/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/closure_lit_lib.glsl @@ -409,7 +409,8 @@ void closure_Glossy_light_eval(ClosureInputGlossy cl_in, { float radiance = light_specular(light.data, cl_eval.ltc_mat, cl_in.N, cl_common.V, light.L); radiance *= cl_eval.ltc_brdf_scale; - cl_out.radiance += light.data.l_color * (light.data.l_spec * light.contact_shadow * radiance); + cl_out.radiance += light.data.l_color * + (light.data.l_spec * light.vis * light.contact_shadow * radiance); } void closure_Glossy_planar_eval(ClosureInputGlossy cl_in, @@ -641,7 +642,7 @@ void closure_Diffuse_light_eval(ClosureInputDiffuse cl_in, float radiance = light_diffuse(light.data, cl_in.N, cl_common.V, light.L); /* TODO(fclem) We could try to shadow lights that are shadowless with the ambient_occlusion * factor here. */ - cl_out.radiance += light.data.l_color * (light.contact_shadow * radiance); + cl_out.radiance += light.data.l_color * (light.vis * light.contact_shadow * radiance); } void closure_Diffuse_grid_eval(ClosureInputDiffuse cl_in, @@ -716,7 +717,7 @@ void closure_Translucent_light_eval(ClosureInputTranslucent cl_in, inout ClosureOutputTranslucent cl_out) { float radiance = light_diffuse(light.data, cl_in.N, cl_common.V, light.L); - cl_out.radiance += light.data.l_color * radiance; + cl_out.radiance += light.data.l_color * (light.vis * radiance); } void closure_Translucent_grid_eval(ClosureInputTranslucent cl_in, |