Selaa lähdekoodia

Fixed indirect light extraction in Material

Teencrusher 9 vuotta sitten
vanhempi
commit
b4737b0206
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      jme3-core/src/main/java/com/jme3/material/Material.java

+ 2 - 0
jme3-core/src/main/java/com/jme3/material/Material.java

@@ -713,12 +713,14 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
                 ambientLightColor.addLocal(l.getColor());
                 if(removeLights){
                     lightList.remove(l);
+                    j--;
                 }
             }
             if (l instanceof LightProbe) {
                 probe = (LightProbe)l;                
                 if(removeLights){
                     lightList.remove(l);
+                    j--;
                 }
             }
         }