Jump to content
  • Advertisement
Sign in to follow this  
Monder

OpenGL Render to texture and full screen glow

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

I want to implement the full-screen glow effect described in this article using OpenGL. However I'm not entirely sure how to acomplish one part where after making a reduced size copy of the frame buffer to a texture. You multiply the RGB values of the all the texels in the texture by the alpha component giving you a texture showing the glow sources. Should I do this by after copying the frame buffer to a texture render the texture on a fullscreen quad and use a pixel shader to multiply the RGB values by the alpha values having the final results rendered to another texture, which would then be blured? Or is there another method that would be better to use? Also is there a decent cross-platform way to do render to texture? I'm planning to use pbuffers ATM but I don't think these work on linux.

Share this post


Link to post
Share on other sites
Advertisement
There are various possibilities. You could simply render a quad over the offscreen buffer, and use the blending stage to multiply destination alpha with destination colour. No need to bind any textures here. Or, depending on what kind of algorithm you use to do the blurring, you could simply add the RGB*alpha multiply into your blurring fragment shader, just after you fetched the texel colours. What kind of hardware are you targeting here ?

Quote:

Also is there a decent cross-platform way to do render to texture? I'm planning to use pbuffers ATM but I don't think these work on linux.

They do (click), but that's obviously not enough to do fast RTT. But there is hope, EXT_render_target will hopefully be comming soon, and will finally offer a high performance RTT interface without pbuffers. And since it's not a WGL/GLX extension, Linux support should be very easy.

Share this post


Link to post
Share on other sites
Quote:
What kind of hardware are you targeting here ?


Well I'm not sure if I'm going to even release this thing once it's in a playable state, so basically I just want something that'll work on my GeForce 4 Ti 4800 [smile]. I think I'll go for blending a quad over the buffer to do the RGB * A, it seems the easiest way.

Thanks for the help.

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!