Fix T73335 Overlay: Light Distance line does not represent custom distance

This is a fix to the issue that light distance line end does not represent
anything now that shadow bounds are computed automatically.
This commit is contained in:
Clément Foucault
2020-01-23 14:25:34 +01:00
parent fb0136f908
commit 6dcbc3cd5a

View File

@@ -623,8 +623,9 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob)
copy_m4_m4(instdata.mat, ob->obmat);
/* FIXME / TODO: clipend has no meaning nowadays.
* In EEVEE, Only clipsta is used shadowmaping.
* Clip end is computed automatically based on light power. */
instdata.clip_end = la->clipend;
* Clip end is computed automatically based on light power.
* For now, always use the custom distance as clipend. */
instdata.clip_end = la->att_dist;
instdata.clip_sta = la->clipsta;
DRW_buffer_add_entry(cb->groundline, instdata.pos);