From f01646993319a935b68444c95ae271b4bf91651b Mon Sep 17 00:00:00 2001 From: javasabr Date: Mon, 23 Jan 2017 22:50:30 +0300 Subject: [PATCH] to prev --- .../java/com/jme3/shadow/DirectionalLightShadowRenderer.java | 2 +- .../src/main/java/com/jme3/shadow/PointLightShadowRenderer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java index 5fb2a6929..0768ff027 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java @@ -221,7 +221,7 @@ public class DirectionalLightShadowRenderer extends AbstractShadowRenderer { @Override protected void setMaterialParameters(Material material) { material.setColor("Splits", splits); - material.setVector3("LightDir", light.getDirection()); + material.setVector3("LightDir", light == null ? new Vector3f() : light.getDirection()); if (fadeInfo != null) { material.setVector2("FadeInfo", fadeInfo); } diff --git a/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java b/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java index 06c4451f1..f9d45984e 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.java @@ -174,7 +174,7 @@ public class PointLightShadowRenderer extends AbstractShadowRenderer { @Override protected void setMaterialParameters(Material material) { - material.setVector3("LightPos", light.getPosition()); + material.setVector3("LightPos", light == null ? new Vector3f() : light.getPosition()); } @Override