From a01fe76ded36beb5dbd0b1cf72ce3c92ab989a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 10 Sep 2018 18:05:00 +0200 Subject: [PATCH] Eevee: Fix assert when using transparent shadows Was missing some UBO bindings. --- source/blender/draw/engines/eevee/eevee_lights.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c index 2c970fa5285..b8a7789fb46 100644 --- a/source/blender/draw/engines/eevee/eevee_lights.c +++ b/source/blender/draw/engines/eevee/eevee_lights.c @@ -433,7 +433,7 @@ void EEVEE_lights_cache_shcaster_add( } void EEVEE_lights_cache_shcaster_material_add( - EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_PassList *psl, struct GPUMaterial *gpumat, + EEVEE_ViewLayerData *sldata, EEVEE_PassList *psl, struct GPUMaterial *gpumat, struct GPUBatch *geom, struct Object *ob, float *alpha_threshold) { /* TODO / PERF : reuse the same shading group for objects with the same material */ @@ -441,6 +441,15 @@ void EEVEE_lights_cache_shcaster_material_add( if (grp == NULL) return; + /* Grrr needed for correctness but not 99% of the time not needed. + * TODO detect when needed? */ + DRW_shgroup_uniform_block(grp, "probe_block", sldata->probe_ubo); + DRW_shgroup_uniform_block(grp, "grid_block", sldata->grid_ubo); + DRW_shgroup_uniform_block(grp, "planar_block", sldata->planar_ubo); + DRW_shgroup_uniform_block(grp, "light_block", sldata->light_ubo); + DRW_shgroup_uniform_block(grp, "shadow_block", sldata->shadow_ubo); + DRW_shgroup_uniform_block(grp, "common_block", sldata->common_ubo); + if (alpha_threshold != NULL) DRW_shgroup_uniform_float(grp, "alphaThreshold", alpha_threshold, 1);