From 45321fc7d5a2cb248d78e880f534b5d6c303c727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Bouquet?= Date: Fri, 6 Nov 2015 09:19:33 +0100 Subject: [PATCH] Fixed an issue in material when having classic lights along with a LightProbe --- .../src/main/java/com/jme3/material/Material.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/material/Material.java b/jme3-core/src/main/java/com/jme3/material/Material.java index 73e1ed69e..a727f104e 100644 --- a/jme3-core/src/main/java/com/jme3/material/Material.java +++ b/jme3-core/src/main/java/com/jme3/material/Material.java @@ -787,12 +787,15 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable { } ColorRGBA color = l.getColor(); //Color - lightData.setVector4InArray(color.getRed(), - color.getGreen(), - color.getBlue(), - l.getType().getId(), - lightDataIndex); - lightDataIndex++; + + if(l.getType() != Light.Type.Probe){ + lightData.setVector4InArray(color.getRed(), + color.getGreen(), + color.getBlue(), + l.getType().getId(), + lightDataIndex); + lightDataIndex++; + } switch (l.getType()) { case Directional: