Fixed an issue with multiple shadow renderers.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10735 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent 044ec5d66f
commit b577a6c336
  1. 2
      engine/src/core/com/jme3/shadow/AbstractShadowRenderer.java
  2. 1
      engine/src/core/com/jme3/shadow/PointLightShadowRenderer.java
  3. 1
      engine/src/core/com/jme3/shadow/SpotLightShadowRenderer.java

@ -448,7 +448,7 @@ public abstract class AbstractShadowRenderer implements SceneProcessor, Savable
renderManager.setForcedTechnique(postTechniqueName);
//rendering the post shadow pass
viewPort.getQueue().renderShadowQueue(lightReceivers, renderManager, cam, flushQueues);
viewPort.getQueue().renderShadowQueue(lightReceivers, renderManager, cam, false);
if (flushQueues) {
sceneReceivers.clear();
}

@ -127,6 +127,7 @@ public class PointLightShadowRenderer extends AbstractShadowRenderer {
@Override
GeometryList getReceivers(GeometryList sceneReceivers, GeometryList lightReceivers) {
lightReceivers.clear();
ShadowUtil.getGeometriesInLightRadius(sceneReceivers, shadowCams, lightReceivers);
return lightReceivers;
}

@ -143,6 +143,7 @@ public class SpotLightShadowRenderer extends AbstractShadowRenderer {
@Override
GeometryList getReceivers(GeometryList sceneReceivers, GeometryList lightReceivers) {
lightReceivers.clear();
ShadowUtil.getGeometriesInCamFrustum(sceneReceivers, shadowCam, lightReceivers);
return lightReceivers;
}

Loading…
Cancel
Save