Eevee: Add failsafe check in shadow material.

This commit is contained in:
Clément Foucault 2017-07-11 12:42:59 +02:00
parent c0f2cbab4e
commit 64890a62cd
1 changed files with 3 additions and 0 deletions

View File

@ -200,6 +200,9 @@ void EEVEE_lights_cache_shcaster_material_add(
EEVEE_SceneLayerData *sldata, EEVEE_PassList *psl, struct GPUMaterial *gpumat, struct Gwn_Batch *geom, float (*obmat)[4], float *alpha_threshold)
{
DRWShadingGroup *grp = DRW_shgroup_material_instance_create(gpumat, psl->shadow_cube_pass, geom);
if (grp == NULL) return;
DRW_shgroup_uniform_block(grp, "shadow_render_block", sldata->shadow_render_ubo);
DRW_shgroup_uniform_mat4(grp, "ShadowModelMatrix", (float *)obmat);