Im relativly new to shaders in general, and I have an application I want to drop bloom shader into.
Basically the app/game is all billboard textures constantly moving all with varying levels of transparency, so what I think I need is just a fragment shader which will compute my bloom.
The problem is I have to do this in a post-process way. Now thats not really that big of a deal, the actual shader operation is very quick. The problem is getting the rastered image and then binding it to GL. This seems like a very heavy handed approch.
What im doing (on each frame/draw)
- [QUICK] render all my billboards
- [SLOW] Taking a screenshot using: BufferedImage image = com.sun.opengl.util.Screenshot.readToBufferedImage(SysConfig.WIDTH, SysConfig.HEIGHT);
- [SLOW] binding that image to GL
- [QUICK] enable the shader
- [QUICK] drawing that image over everthing else
- [QUICK] disable the shader
What am I missing? Obviously im missing *something, so many apps implement bloom, and post-process seems to be the standard way to do this. However doing it the way I am doing this is just too heavy to use