Fix T67753 EEVEE: Crash using transparent shadows with default material

This commit is contained in:
Clément Foucault 2019-10-07 22:16:37 +02:00
parent da9ac42588
commit a856c5eccf
Notes: blender-bot 2023-02-14 04:07:50 +01:00
Referenced by issue #70962, Render image / render animation crash with OptiX enabled (works with CUDA)
Referenced by issue #70659, Warning, Regression, slow vertex selection
Referenced by issue #70626, VSE: Slip Strip Operator Doesn't Register Transformation on Confirm
Referenced by issue #70627, Crash when using Mesh>Normals>Point To Target
Referenced by issue #67753, Alpha BLEND and SHADOW together cause crash
1 changed files with 3 additions and 1 deletions

View File

@ -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;