diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-10-07 23:16:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-10-07 23:16:53 +0300 |
commit | a856c5eccffba817a1e9ac499e0156fc6d4eb3c3 (patch) | |
tree | c1e0c0bbaaf7f31b06b57390dff7c0f869616045 /source | |
parent | da9ac42588a1885825df0155d58a7df81d7b809f (diff) |
Fix T67753 EEVEE: Crash using transparent shadows with default material
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index f01c6363ccb..701d73461fc 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -1588,7 +1588,9 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, /* Shadow Pass */ struct GPUMaterial *gpumat; - switch (ma_array[i]->blend_shadow) { + const bool use_gpumat = (ma_array[i]->use_nodes && ma_array[i]->nodetree); + char blend_shadow = use_gpumat ? ma_array[i]->blend_shadow : MA_BS_SOLID; + switch (blend_shadow) { case MA_BS_SOLID: EEVEE_shadows_caster_add(sldata, stl, mat_geom[i], ob); *cast_shadow = true; |