Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-05-23 16:30:38 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-23 16:32:05 +0300
commitdf7f69b8735f440f22404ab65698404deff30ed7 (patch)
treee0c08d07e813302ee0b215915d5f42db7332a1ae /source/blender/nodes
parent44f9a502e7e7713c1760ffd59539d927211031fe (diff)
Eevee: Fix SSS energy disapearing with alpha blended material
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c
index 6c3e082f36a..48065cb10c9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c
@@ -164,7 +164,7 @@ static int node_shader_gpu_bsdf_principled(GPUMaterial *mat,
else if (use_subsurf && use_diffuse && !use_refract && !use_clear) {
static char name[] = "node_bsdf_principled_subsurface";
node_name = name;
- flag = GPU_MATFLAG_DIFFUSE | GPU_MATFLAG_SSS | GPU_MATFLAG_GLOSSY;
+ flag = GPU_MATFLAG_DIFFUSE | GPU_MATFLAG_GLOSSY;
}
else if (!use_subsurf && !use_diffuse && use_refract && !use_clear && !socket_not_zero(4)) {
static char name[] = "node_bsdf_principled_glass";
@@ -174,7 +174,11 @@ static int node_shader_gpu_bsdf_principled(GPUMaterial *mat,
else {
static char name[] = "node_bsdf_principled";
node_name = name;
- flag = GPU_MATFLAG_DIFFUSE | GPU_MATFLAG_GLOSSY | GPU_MATFLAG_SSS | GPU_MATFLAG_REFRACT;
+ flag = GPU_MATFLAG_DIFFUSE | GPU_MATFLAG_GLOSSY | GPU_MATFLAG_REFRACT;
+ }
+
+ if (use_subsurf) {
+ flag |= GPU_MATFLAG_SSS;
}
GPU_material_flag_set(mat, flag);