diff --git a/jme3-core/src/main/java/com/jme3/material/logic/MultiPassLightingLogic.java b/jme3-core/src/main/java/com/jme3/material/logic/MultiPassLightingLogic.java index 61e9f26cb..d239681bc 100644 --- a/jme3-core/src/main/java/com/jme3/material/logic/MultiPassLightingLogic.java +++ b/jme3-core/src/main/java/com/jme3/material/logic/MultiPassLightingLogic.java @@ -86,7 +86,7 @@ public final class MultiPassLightingLogic extends DefaultTechniqueDefLogic { for (int i = 0; i < lights.size(); i++) { Light l = lights.get(i); - if (l instanceof AmbientLight) { + if (l.getType() == Light.Type.Ambient || l.getType() == Light.Type.Probe) { continue; } @@ -156,8 +156,6 @@ public final class MultiPassLightingLogic extends DefaultTechniqueDefLogic { lightDir.setValue(VarType.Vector4, tmpLightDirection); - break; - case Probe: break; default: throw new UnsupportedOperationException("Unknown type of light: " + l.getType()); diff --git a/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java b/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java index 015d6b1da..67261742e 100644 --- a/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java +++ b/jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java @@ -106,7 +106,6 @@ public final class SinglePassLightingLogic extends DefaultTechniqueDefLogic { lightData.setVector4Length(numLights * 3);//8 lights * max 3 Uniform ambientColor = shader.getUniform("g_AmbientLightColor"); - if (startIndex != 0) { // apply additive blending for 2nd and future passes rm.getRenderer().applyRenderState(ADDITIVE_LIGHT); @@ -123,7 +122,7 @@ public final class SinglePassLightingLogic extends DefaultTechniqueDefLogic { for (curIndex = startIndex; curIndex < endIndex && curIndex < lightList.size(); curIndex++) { Light l = lightList.get(curIndex); - if (l.getType() == Light.Type.Ambient) { + if (l.getType() == Light.Type.Ambient || l.getType() == Light.Type.Probe) { endIndex++; continue; } @@ -185,8 +184,6 @@ public final class SinglePassLightingLogic extends DefaultTechniqueDefLogic { lightData.setVector4InArray(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), spotAngleCos, lightDataIndex); lightDataIndex++; break; - case Probe: - break; default: throw new UnsupportedOperationException("Unknown type of light: " + l.getType()); }