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 33adf1c09..196bfbe7c 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java +++ b/jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java @@ -145,7 +145,7 @@ public class DirectionalLightShadowRenderer extends AbstractShadowRenderer { float frustumNear = Math.max(viewCam.getFrustumNear(), 0.001f); ShadowUtil.updateFrustumPoints(viewCam, frustumNear, zFar, 1.0f, points); - //shadowCam.setDirection(direction); + shadowCam.setFrustumFar(zFar); shadowCam.getRotation().lookAt(light.getDirection(), shadowCam.getUp()); shadowCam.update(); shadowCam.updateViewProjection(); diff --git a/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java b/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java index d97a354f9..51942cdac 100644 --- a/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java +++ b/jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java @@ -465,7 +465,7 @@ public class ShadowUtil { shadowCam.setProjectionMatrix(null); if (ortho) { - shadowCam.setFrustum(-1, 1, -1, 1, 1, -1); + shadowCam.setFrustum(-shadowCam.getFrustumFar(), shadowCam.getFrustumFar(), -1, 1, 1, -1); } // create transform to rotate points to viewspace