Got it, might need some adjustments but it sorta works.
Heres the code for it, i've commented out the parts related to an Object3d and my attempts to use shaders as a post processing effect(naming convention is a mess too).
when "switchToGlowRender" is set to 'true' some Objects will be rendered completely black via their glsl fragment shaders, Others will be properly rendered.
In the case of the Aura effect im attempting it's only rendered during the glow render.
public class GlowProcessHandler {
public NPOTTexture toProcess;
World world;
public Boolean switchToGlowRender = false;
//Object3D theRenderspot = null;
// GLSLShader renderShader = null;
// PostProcessingRenderHook renderHook = null;
TextureManager tm = TextureManager.getInstance();
int divRatio;
public GlowProcessHandler(World world, Resources res, FrameBuffer bf) {
// this.theRenderspot = Primitives.getPlane(6, 8);
divRatio=32;
// renderShader = new GLSLShader(Loader.loadTextFile(res.openRawResource(R.raw.postprocess_vert)),
// Loader.loadTextFile(res.openRawResource(R.raw.postprocess_frag)));
this.world = world;
toProcess = new NPOTTexture(bf.getWidth()/divRatio , bf.getHeight()/divRatio, RGBColor.BLACK);
toProcess.setFiltering(true);
toProcess.setMipmap(false);
tm.addTexture("postprocess", toProcess);
// theRenderspot.setTexture("postprocess");
//theRenderspot.setTransparency(3);
//theRenderspot.setCulling(false);
//renderHook = new PostProcessingRenderHook(theRenderspot, renderShader);
//renderHook.setCurrentShader(renderShader);
// theRenderspot.setOrigin(new SimpleVector(10, 0, 0));
// theRenderspot.setShader(renderShader);
// theRenderspot.setRenderHook(renderHook);
}
public void doPostProcess(FrameBuffer fb) {
switchToGlowRender = true;
fb.setRenderTarget(toProcess);
fb.clear(Color.BLACK);
world.renderScene(fb);
world.draw(fb);
fb.display();
fb.removeRenderTarget();
switchToGlowRender = false;
}
public void doBlit(FrameBuffer fb)
{
fb.blit(toProcess, 0, 0, 0, fb.getHeight(),
fb.getWidth()/divRatio, fb.getHeight()/divRatio, fb.getWidth(), -fb.getHeight(), 44, true, null);
}
}