Hello guys, hope you are doing well.
This week I'll start working on postprocessing for my demo scene and I would like to add some effects like bloom or lens flares. I've been reading some blogs and information related with this effects and most of this sources say that you should apply this effects in a specific order.
This is what I understand of each effect:
+ HDR: basic render targets stores color in the range of 0-255 (0-1), many scenes will generate colors beyond this mark for example specular highlights. We can use floating point render targets so values wont be clamped.
+ Bloom: Takes bright parts of the image, blurs them and adds to the final scene (it gives a cool glare effect). It works well with HDR as the bright values can be bigger than 1.
+ Lens flares: Its an effect that happens when the light interacts with the lens of a camera.
+ Tone mapping: transforms the HDR values to the expected LDR values.
+ Gamma correction: adjust the color curve so it matches with the monitor.
In my engine, I'm using a forward rendering pipeline. At the end of the frame, I have a framebuffer with all the stuff rendered that frame.
This is how I would do the postprocessing:
Bloom->Lens flares->tone mapping->gamma correction
(All of the steps are using floating point textures)
What do you think?
Thanks!