Shaders - Simple Brightpass Filter

/
0 Comments
In HDR rendering ( and LDR too ) is common to add bloom to the scene. To create it, you need to mask the bright parts of the scene, blur it ( NVIDIA has a nice constant-time Gaussian blur ) and combine it with the scene, normally by adding them.
A lot of Brightpass filters exist, so I'm just gonna post mine here

   float4 bright = saturate((-color + pow(color,Power) * Scale) / Bias);

Screenshots:

Below is a plot of the function, with adjustable parameters. I use 2.58 for Power, 1.58 for Scale and 1.13 for Bias, but feel free to experiment. One of the graphs is the saturated function and the other is un-saturated



You may also like

No comments:

Pages

Powered by Blogger.