- 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. 11
      engine/src/desktop-fx/com/jme3/post/filters/BloomFilter.java

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

Loading…
Cancel
Save