Some things with implementing bloom

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Tihtinen
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Some things with implementing bloom

Post by Tihtinen »

So, I've got basic stuff working (including depth map) in my post-processing "framework", but I have some problems implementing more sophisticated effects like bloom.

As far as I know, I need at least 2 simultaneous RTTs, one for the normal rendered screen and another for the bright area separation and blurring. Currently I set the current work buffer as the first texture of the screen quad and depth buffer as the second texture. I figured I could add 1-2 work buffers as texture layers 3 and 4, but my problem is that while I can sample all texture layers I have no knowledge how I can work on the other layers besides the first one.

Currently my framework works by switching 2 RTTs after every post-processing pass (other works as input and the other as the render target). So the ideal solution would be able to simultaneously render to two separate textures to handle effects like bloom which need temporary "work buffers".

My friend at work said I'd need MRTs (multiple render targets) but didn't have time to ask more about that.

So if some shader guru could please point me in the right direction I'd be grateful :)
Mel
Competition winner
Posts: 2293
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

For bloom and glow:

http://http.developer.nvidia.com/GPUGem ... _ch21.html

You don't need MRT. Normally the postprocessing consists of several simple effects chained, say perhaps a luminance pass, a horizontal blur, a vertical blur, a tonemap and a combination of all the passes in the final image. If you got your framework "working", manage so you can chain your effects.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply