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/gpu
parent44f9a502e7e7713c1760ffd59539d927211031fe (diff)
Eevee: Fix SSS energy disapearing with alpha blended material
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_material.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index fde60fd387d..007a13a06ef 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -620,7 +620,7 @@ void GPU_material_flag_set(GPUMaterial *mat, eGPUMatFlag flag)
bool GPU_material_flag_get(GPUMaterial *mat, eGPUMatFlag flag)
{
- return (mat->flag & flag);
+ return (mat->flag & flag) != 0;
}
GPUMaterial *GPU_material_from_nodetree_find(ListBase *gpumaterials,
@@ -684,7 +684,10 @@ GPUMaterial *GPU_material_from_nodetree(Scene *scene,
if (mat->outlink) {
/* HACK: this is only for eevee. We add the define here after the nodetree evaluation. */
if (GPU_material_flag_get(mat, GPU_MATFLAG_SSS)) {
- defines = BLI_string_joinN(defines, "#define USE_SSS\n");
+ defines = BLI_string_joinN(defines,
+ "#ifndef USE_ALPHA_BLEND\n"
+ "# define USE_SSS\n"
+ "#endif\n");
}
/* Prune the unused nodes and extract attributes before compiling so the
* generated VBOs are ready to accept the future shader. */