From e76559a847d147a382a8d644e92fbd7500b8e66a Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 14 Sep 2014 00:32:10 -0400 Subject: [PATCH] Set the light filter's camera in RenderManager.setCamera() as it is more appropriate. --- .../src/main/java/com/jme3/renderer/RenderManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java b/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java index ea4d2e84d..b8aa705fb 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java +++ b/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java @@ -805,11 +805,6 @@ public class RenderManager { Camera cam = vp.getCamera(); boolean depthRangeChanged = false; - // Tell the light filter which camera to use for filtering. - if (lightFilter != null) { - lightFilter.setCamera(cam); - } - // render opaque objects with default depth range // opaque objects are sorted front-to-back, reducing overdraw if (prof!=null) prof.vpStep(VpStep.RenderBucket, vp, Bucket.Opaque); @@ -936,6 +931,10 @@ public class RenderManager { * false if to use the camera's view and projection matrices. */ public void setCamera(Camera cam, boolean ortho) { + // Tell the light filter which camera to use for filtering. + if (lightFilter != null) { + lightFilter.setCamera(cam); + } setViewPort(cam); setViewProjection(cam, ortho); }