Jump to content
  • Advertisement
Sign in to follow this  
MidgarZolom

OpenGL GLSL "Bloom Effect"

This topic is 4939 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

Hello. I am a veteran OpenGL programmer. However, I am still quite new with shaders. I was wondering if someone could help me figure out how to do something like this: http://www.facewound.com/img/how-the-bumping-works/3-bump-example_finalresult.jpg Here is what I know: Scene is renderered and put into a texture: (http://www.facewound.com/img/how-the-bumping-works/1-bump-example_noshaders.jpg) A normal map is rendered is rendered and put into a texture: (http://www.facewound.com/img/how-the-bumping-works/2-bump-example_normalmap.jpg) Shader takes the two textures and does something. What that thing is, I do not know. I assume it moves pixels based on the color found on the normal map... however, I don't know how to go about doing this! I mean, I know how to move pixels.. just not in this particular fashion. I know how to implement shaders, do multitexturing, lighting, etc- I can do all the tutorials. What I don't understand however is how to do something "different"- something I havn't touched before. Any tips?

Share this post


Link to post
Share on other sites
Advertisement
Ah this should be quite easy since I have done things like that in the past.
Make a first pass where you only draw the objects that you want the bloom effect to apply to, copy it to your first render target and then scale it down by copying it into another smaller target.

Run a blur filter on the smaller target with the output color being multiplied by a coefficient slightly greater than one.

Finally draw your scene normally, enter 2D mode with additive blending activated, and draw a fullscreen quad with your first target bound to it.

I'm in a rush so I'll follow up later with more details regarding the heat haze effect :)

[Edited by - JavaCoolDude on June 8, 2005 8:09:19 PM]

Share this post


Link to post
Share on other sites
I think the name of the effect isn't 'bloom' but more of a distortion. Someone here in the forums had a nice little demo running of it. I wish I knew more so that I could help you...

Share this post


Link to post
Share on other sites
Quote:
Original post by JavaCoolDude
I might be the one you're seeking Moe :D
Check it out, it's on my site, check the demo section on the left :P

Yes, it is indeed you! I am afraid your user name slipped my mind[smile].

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It just involved the technology of "Normalmap", using nomalmap to disturb the origin picture. That's it.

Share this post


Link to post
Share on other sites
I appreciate the help guys, however, I thought I made it clear that I know what's going on.

I know every piece of the puzzle except the shader code to do such a thing. :/

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!