Eevee: Shadows: Don't allocate more CSM layer than we need.

This commit is contained in:
Clément Foucault 2018-05-04 19:24:02 +02:00
parent 0503f31c66
commit 3b0475bc64
1 changed files with 1 additions and 1 deletions

View File

@ -331,7 +331,7 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
if (la->mode & LA_SHADOW) {
if (la->type == LA_SUN) {
int sh_nbr = 1; /* TODO : MSM */
int cascade_nbr = MAX_CASCADE_NUM; /* TODO : Custom cascade number */
int cascade_nbr = la->cascade_count;
if ((linfo->gpu_cascade_ct + sh_nbr) <= MAX_SHADOW_CASCADE) {
/* Save Light object. */