- BloomFilter, fixed background disapearance issue

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8570 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 0dddd8613f
commit 940edfe914
  1. 5
      engine/src/desktop-fx/com/jme3/post/filters/BloomFilter.java

@ -91,7 +91,6 @@ public class BloomFilter extends Filter {
private Material hBlurMat; private Material hBlurMat;
private int screenWidth; private int screenWidth;
private int screenHeight; private int screenHeight;
private ColorRGBA backupColor;
/** /**
* Creates a Bloom filter * Creates a Bloom filter
@ -189,13 +188,11 @@ public class BloomFilter extends Filter {
@Override @Override
protected void postQueue(RenderManager renderManager, ViewPort viewPort) { protected void postQueue(RenderManager renderManager, ViewPort viewPort) {
if (glowMode != GlowMode.Scene) { if (glowMode != GlowMode.Scene) {
backupColor = viewPort.getBackgroundColor(); renderManager.getRenderer().setBackgroundColor(ColorRGBA.Black);
viewPort.setBackgroundColor(ColorRGBA.Black);
renderManager.getRenderer().setFrameBuffer(preGlowPass.getRenderFrameBuffer()); renderManager.getRenderer().setFrameBuffer(preGlowPass.getRenderFrameBuffer());
renderManager.getRenderer().clearBuffers(true, true, true); renderManager.getRenderer().clearBuffers(true, true, true);
renderManager.setForcedTechnique("Glow"); renderManager.setForcedTechnique("Glow");
renderManager.renderViewPortQueues(viewPort, false); renderManager.renderViewPortQueues(viewPort, false);
viewPort.setBackgroundColor(backupColor);
renderManager.setForcedTechnique(null); renderManager.setForcedTechnique(null);
renderManager.getRenderer().setFrameBuffer(viewPort.getOutputFrameBuffer()); renderManager.getRenderer().setFrameBuffer(viewPort.getOutputFrameBuffer());
} }

Loading…
Cancel
Save