Set the light filter's camera in RenderManager.setCamera() as it is more appropriate.

experimental
shadowislord 10 years ago
parent b51f015fb9
commit e76559a847
  1. 9
      jme3-core/src/main/java/com/jme3/renderer/RenderManager.java

@ -805,11 +805,6 @@ public class RenderManager {
Camera cam = vp.getCamera(); Camera cam = vp.getCamera();
boolean depthRangeChanged = false; 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 // render opaque objects with default depth range
// opaque objects are sorted front-to-back, reducing overdraw // opaque objects are sorted front-to-back, reducing overdraw
if (prof!=null) prof.vpStep(VpStep.RenderBucket, vp, Bucket.Opaque); 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. * false if to use the camera's view and projection matrices.
*/ */
public void setCamera(Camera cam, boolean ortho) { 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); setViewPort(cam);
setViewProjection(cam, ortho); setViewProjection(cam, ortho);
} }

Loading…
Cancel
Save