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
3.0
rem..om 12 years ago
parent 3b84ae44e5
commit 7271bf4de7
  1. 4
      engine/src/core/com/jme3/shadow/PssmShadowRenderer.java

@ -421,8 +421,8 @@ public class PssmShadowRenderer implements SceneProcessor {
//Updating shadow cam with curent split frustra //Updating shadow cam with curent split frustra
ShadowUtil.updateShadowCamera(occluders, receivers, shadowCam, points, splitOccluders); ShadowUtil.updateShadowCamera(occluders, receivers, shadowCam, points, splitOccluders);
//saving light view projection matrix for this split //saving light view projection matrix for this split
lightViewProjectionsMatrices[i] = shadowCam.getViewProjectionMatrix().clone(); lightViewProjectionsMatrices[i].set(shadowCam.getViewProjectionMatrix());
renderManager.setCamera(shadowCam, false); renderManager.setCamera(shadowCam, false);
r.setFrameBuffer(shadowFB[i]); r.setFrameBuffer(shadowFB[i]);

Loading…
Cancel
Save