Jump to content
  • Advertisement
Sign in to follow this  
nakolium

Fake-HDR blur problem

This topic is 4357 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, while adding an background-blur / fake-hdr effect to a little program of mine I encountered a "little" problem. After adding the blurred textur to my final scene i wondered where those black/dark edges came from that are visible at some of the "towers" at the following screenshot... clicky thinking about it made clear to me, that the blur shaders do not only blur the sky into the dark areas were the towers and spheres would be later, but also blur the dark areas that should not glow into those which should. i cleared the background to black, to make clear what i mean: clicky Up to now, i use 2 textures to render to via FramebufferObjects, and 2 shaders to blur the results. (one time vertically, and one time horizontally) My idea to get rid of those dark edges/areas in my glow-texture was to render the completely blurred glow to an extra texture, then blend this texture and the one containing the orignal image together using a shader choosing always the brighter pixel, which should solve the problem by discarding the dark blurred pixels and using the unblurred original-value. but that would mean to use an extra texture and another shader. just to make the background a bit glowy [smile] 3 shaders and 3 textures, involving 3 renderpasses are much more than i expected. Finally my question: Is there an easier way to get "clean" results using this fake-hdr approach? Thanks in advance. regards, nakolium --------- Sorry for my bad english ;) My native language is German.

Share this post


Link to post
Share on other sites
Advertisement
Hi,
at some stage of your glow effect pipeline you should have a bright pass filter involved. This filter removes all dark areas from the picture and leaves bright areas in there.
I would first check out what this filter is doing before I would try to tweak the result.
Masake Kawase's Bright pass filter did something like:

RGBA * Luminance

you might check out the way you do luminance first. Try different values here. I think the book HIgh-Dynamic Range Rendering describes the constants that are good for the luminance calculation. I think Masake used

0.299f, 0.587f, 0.114f

- Wolf

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!