Eevee: Fix compilation issue cause by cleanup
authorClément Foucault <foucault.clem@gmail.com>
Wed, 31 Oct 2018 20:14:32 +0000 (21:14 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Wed, 31 Oct 2018 20:14:32 +0000 (21:14 +0100)
source/blender/draw/engines/eevee/eevee_lights.c

index a0426840bb9482784cc2f15b9e86f8a564364e42..5c82eadcbd1a2334ddd1288d70f8e555101a86b0 100644 (file)
@@ -365,7 +365,7 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
                        if (la->type == LA_SUN) {
                                int cascade_nbr = la->cascade_count;
 
-                               if ((linfo->gpu_cascade_len + sh_nbr) <= MAX_SHADOW_CASCADE) {
+                               if ((linfo->gpu_cascade_len + 1) <= MAX_SHADOW_CASCADE) {
                                        /* Save Light object. */
                                        linfo->shadow_cascade_ref[linfo->cpu_cascade_len] = ob;