From ae2fda86266b48f4841023998c71451d40cff95d Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Mon, 25 Jul 2011 15:25:00 +0000 Subject: [PATCH] Spot light : fixed issue that was preventing point lights to work correctly when a spot light is in the scene git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7916 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/material/Material.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/src/core/com/jme3/material/Material.java b/engine/src/core/com/jme3/material/Material.java index ee6a5fe20..369b64681 100644 --- a/engine/src/core/com/jme3/material/Material.java +++ b/engine/src/core/com/jme3/material/Material.java @@ -742,6 +742,8 @@ public class Material implements Asset, Cloneable, Savable, Comparable tmpLightPosition.set(dir.getX(), dir.getY(), dir.getZ(), -1); lightPos.setValue(VarType.Vector4, tmpLightPosition); + tmpLightDirection.set(0,0,0,0); + lightDir.setValue(VarType.Vector4, tmpLightDirection); break; case Point: PointLight pl = (PointLight) l; @@ -750,6 +752,8 @@ public class Material implements Asset, Cloneable, Savable, Comparable tmpLightPosition.set(pos.getX(), pos.getY(), pos.getZ(), invRadius); lightPos.setValue(VarType.Vector4, tmpLightPosition); + tmpLightDirection.set(0,0,0,0); + lightDir.setValue(VarType.Vector4, tmpLightDirection); break; case Spot: SpotLight sl = (SpotLight) l;