From 2ce2995956bab258931db8caa426336f5d1ed54d Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sat, 9 Sep 2017 13:47:35 -0400 Subject: [PATCH] Don't reset lights that were never checked in light filter --- jme3-core/src/main/java/com/jme3/light/DefaultLightFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/light/DefaultLightFilter.java b/jme3-core/src/main/java/com/jme3/light/DefaultLightFilter.java index 84cdc17fc..2710e6a29 100644 --- a/jme3-core/src/main/java/com/jme3/light/DefaultLightFilter.java +++ b/jme3-core/src/main/java/com/jme3/light/DefaultLightFilter.java @@ -42,7 +42,7 @@ import java.util.HashSet; public final class DefaultLightFilter implements LightFilter { private Camera camera; - private final HashSet processedLights = new HashSet(); + private final HashSet processedLights = new HashSet<>(); private final LightProbeBlendingStrategy probeBlendStrat; public DefaultLightFilter() { @@ -59,6 +59,7 @@ public final class DefaultLightFilter implements LightFilter { for (Light light : processedLights) { light.frustumCheckNeeded = true; } + processedLights.clear(); } @Override