Fix T81177 EEVEE: Missing shadow if last material has no shadow

This was caused by the boolean not being a union of all the material
slots.
This commit is contained in:
Clément Foucault
2021-02-01 14:54:08 +01:00
parent d1ee8a0502
commit c02f2d7371

View File

@@ -856,7 +856,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata,
ADD_SHGROUP_CALL(matcache[i].shading_grp, ob, mat_geom[i], oedata);
ADD_SHGROUP_CALL_SAFE(matcache[i].depth_grp, ob, mat_geom[i], oedata);
ADD_SHGROUP_CALL_SAFE(matcache[i].shadow_grp, ob, mat_geom[i], oedata);
*cast_shadow = (matcache[i].shadow_grp != NULL);
*cast_shadow = *cast_shadow || (matcache[i].shadow_grp != NULL);
}
}
}