diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-11-14 23:34:20 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-11-14 23:34:20 +0300 |
commit | 3546636870f9cd81319c606b5d0bac9afeff3d70 (patch) | |
tree | e05adb59022ce7b18232d9be689ca212488b2f56 /source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | |
parent | e70c563aa375a18dd272b4d6cad8ae1ef08fbabf (diff) |
Eevee: SSS: Fix SSS with Add Shader node.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index 179d2f9096b..bd6c1923bfe 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -634,6 +634,9 @@ Closure closure_mix(Closure cl1, Closure cl2, float fac) Closure closure_add(Closure cl1, Closure cl2) { Closure cl = (cl1.ssr_id == outputSsrId) ? cl1 : cl2; +#ifdef USE_SSS + cl.sss_data = (cl1.sss_data.a > 0.0) ? cl1.sss_data : cl2.sss_data; +#endif cl.radiance = cl1.radiance + cl2.radiance; cl.opacity = cl1.opacity + cl2.opacity; return cl; |