Jump to content
  • Advertisement
cebugdev

OpenGL Bloom/Glow effect in OpenGL question

Recommended Posts

 

Hi,

I was studying making bloom/glow effect in OpenGL and following the tutorials from learnopengl.com and ThinMatrix (youtube) tutorials, but i am still confuse 

on how to generate the bright colored texture to be used for blur.

Do I need to put lights in the area of location i want the glow to happen so it will be brighter than other object in the scene?, that means i need to draw the scene with the light first?

or does the brightness can be extracted based on how the color of the model was rendered/textured thru a formula or something?

I have a scene that looks like this that i want to glow the crystal

image.png.6c71902fbb5fa74fb9b4f308385ee2b8.png

can somebody enlighten me on how or what the correct approach is?

really appreciated!

Share this post


Link to post
Share on other sites
Advertisement

I would guess the crystal is done with a simple emissive property, and a point light without shadowmap?

 

Share this post


Link to post
Share on other sites

Bloom is typically done by extracting the bright pixels of the scene, then doing a blur, then additively applying the blurred pixels back onto the frame buffer.

The bright pixels can come from bright lighting or bright emissive values. What you determine to be "bright" or "bloomable" is up to you.

Share this post


Link to post
Share on other sites

Hi,

Bloom, Glow  and Blur effects whether in HLSL or GLSL are normally done using post processing effect, post processing meaning you do the filtering after you render the scene to a render target usually bloom and blur effects are combined together to get a better result.

1. Render your regular scene to a render target
2. On your BloomBlur effect pass the render target as sampler for lookup table for brightness
   and do the necessary brightness,blur  adjustment to the final sampler ( other sampler )
3. Draw the final sampler on screen

I've one this in the past, the que to look for is "Bloom Post processing effect",  information about this is abundant over the internet even with effects sample.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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!