Sculpt: Fix T104040: Always update eevee shadows in sculpt modes

This commit is contained in:
Joseph Eagar 2023-01-30 21:28:30 -08:00
parent 79c82fc1c5
commit 91263a8b8b
Notes: blender-bot 2023-04-19 22:54:54 +02:00
Referenced by issue #104040, Regression: contact shadows doesn't update in sculpt mode
2 changed files with 6 additions and 0 deletions

View File

@ -848,6 +848,8 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata,
MATCACHE_AS_ARRAY(matcache, shadow_grp, materials_len, shgrps_array);
DRW_shgroup_call_sculpt_with_materials(shgrps_array, gpumat_array, materials_len, ob);
*cast_shadow = true;
}
else {
struct GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len);

View File

@ -139,6 +139,10 @@ void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, Object *ob)
BLI_BITMAP_SET(backbuffer->update, past_id, oedata->need_update);
}
update = oedata->need_update;
/* Always update shadow buffers in sculpt modes. */
update |= ob->sculpt != NULL;
oedata->need_update = false;
}