From 7271bf4de752360f241470b73eac575aaf34724f Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Wed, 31 Oct 2012 22:42:07 +0000 Subject: [PATCH] Made the PSSmRenderer stop to create a new matrix for each split on every frame git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9931 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/shadow/PssmShadowRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java b/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java index 404d5a9e7..cddb5dd21 100644 --- a/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java +++ b/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java @@ -421,8 +421,8 @@ public class PssmShadowRenderer implements SceneProcessor { //Updating shadow cam with curent split frustra ShadowUtil.updateShadowCamera(occluders, receivers, shadowCam, points, splitOccluders); - //saving light view projection matrix for this split - lightViewProjectionsMatrices[i] = shadowCam.getViewProjectionMatrix().clone(); + //saving light view projection matrix for this split + lightViewProjectionsMatrices[i].set(shadowCam.getViewProjectionMatrix()); renderManager.setCamera(shadowCam, false); r.setFrameBuffer(shadowFB[i]);