I want to basically make a blur shader in glsl and use it like Windows 7 does for Windows. I want to for example draw something and then blur a rectangle, then draw text over it.

If someone could point me in the right direction on how to do this I'd be very grateful.



1 Answer 1


This kind of effect is known as a Guassian blur. It's a relatively common effect, so you can find information about the algorithm and even some sample shaders relatively easily: for example, here, here and here were the first three Google results that looked vaguely worthwhile.

The general idea is that you're going to have to render the scene you want blurred into a render target texture, then bind that texture for a second render phase during which you'll compute the blur effect.

To render sharp images on top of the blur (for example, your text), you can render the blurring phase into a render target texture as well, and bind that texture for the final pass where you'd render your text over the scene.

You may also want to look for discussion of GPU post-processing systems to get a feel for how you might architect you render pipeline to be generally scalable to these sorts of multi-phase effects.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .