Shadows: make sure to clear all buffers

experimental
Kirill Vainer 10 years ago
parent f733b69f9f
commit f74ae990d4
  1. 2
      jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java
  2. 2
      jme3-core/src/main/java/com/jme3/shadow/BasicShadowRenderer.java
  3. 2
      jme3-core/src/main/java/com/jme3/shadow/PssmShadowRenderer.java

@ -424,7 +424,7 @@ public abstract class AbstractShadowRenderer implements SceneProcessor, Savable
renderManager.setCamera(shadowCam, false);
renderManager.getRenderer().setFrameBuffer(shadowFB[shadowMapIndex]);
renderManager.getRenderer().clearBuffers(false, true, false);
renderManager.getRenderer().clearBuffers(true, true, true);
// render shadow casters to shadow map
viewPort.getQueue().renderShadowQueue(shadowMapOccluders, renderManager, shadowCam, true);

@ -190,7 +190,7 @@ public class BasicShadowRenderer implements SceneProcessor {
renderManager.setForcedMaterial(preshadowMat);
r.setFrameBuffer(shadowFB);
r.clearBuffers(false, true, false);
r.clearBuffers(true, true, true);
viewPort.getQueue().renderShadowQueue(shadowOccluders, renderManager, shadowCam, true);
r.setFrameBuffer(viewPort.getOutputFrameBuffer());

@ -450,7 +450,7 @@ public class PssmShadowRenderer implements SceneProcessor {
}
r.setFrameBuffer(shadowFB[i]);
r.clearBuffers(false, true, false);
r.clearBuffers(true, true, true);
// render shadow casters to shadow map
viewPort.getQueue().renderShadowQueue(splitOccluders, renderManager, shadowCam, true);

Loading…
Cancel
Save