BloomRenderPass

Hello Community,



I am currently experimenting with BloomRenderPass and I'm getting a problem I don't understand. My textures and objects are supposed to bloom once i roll the mouse over them and it works they bloom when I roll the mouse over them. However, I can't get the bloom to be just on top of the desired texture and object, and instead the bloom is placed in the whole scene and whole object. Anyone has any thoughts of why the bloom is being showed in the whole scene including dark areas, and not just on the texture/objects. Here is the snippet of the code I'm having trouble with.





rollOverSelected is of type Node.



Thanks for your time.


        rollOverSelected.updateRenderState();
      rollOverSelected.updateGeometricState(0, true);

      RenderPass rootPass = new RenderPass();
      rootPass.add(rollOverSelected.getParent());
      pManager.add(rootPass);
      
      bloomRenderPass = new BloomRenderPass(this.cam, 4);
      
      bloomRenderPass.add(rollOverSelected.getParent());
      bloomRenderPass.setEnabled(true);   
      
          if(!bloomRenderPass.isSupported()) {
             //System.out.println(" is not supported");
              Text t = new Text("Text", "GLSL Not supported on this computer.");
              t.setRenderQueueMode(Renderer.QUEUE_ORTHO);
              t.setLightCombineMode(LightState.OFF);
              t.setLocalTranslation(new Vector3f(0,20,0));
          } else {
             //System.out.println("is supported");
             //bloomRenderPass.setBlurIntensityMultiplier(.7f);
             bloomRenderPass.add(rollOverSelected);
              bloomRenderPass.setExposurePow(2.0f);
              pManager.add(bloomRenderPass);            
          }       

      }   

Since this is the first post that comes up when you search for 'bloom', I feel like this thread could use an answer.



It's as simple as setting


bloomPass.setUseCurrentScene(false);