http://code.google.com/p/bloom-lib/
@render
- Code: Select all
bloom.capture();
//your render code
bloom.render();
@create
- Code: Select all
bloom = new Bloom();//too small can cause aliasing but is lot faster
@resume
- Code: Select all
bloom.resume();
Pipeline goes something like this. Capture your scene to fbo with bloom.capture();
Call bloom.render(). Then library does take minimized copy of original image with highpass filter(simple treshold, adjustable).
That smaller image is pinponges via horizontal and vertical gaussian passes. Blur is identic with 9x9 size kernel but use only 10texture look ups without any dependance reads, this is ridicoulous fast way to blur.
Then scene is rendered with fullscreen pass back to screen. Shader in this stage is pretty minimalistic.
//final

//only bloom texture

//original

Use it freely.
