fix-456
javasabr 8 years ago
parent 6c3100f929
commit f016469933
  1. 2
      jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java
  2. 2
      jme3-core/src/main/java/com/jme3/shadow/PointLightShadowRenderer.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);
}

@ -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

Loading…
Cancel
Save