Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

defster

Blurring the screen

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

How do i blur the screenbuffer or parts of it? I''ve scanned several forums and irc channels, but i cant seem to find theory or sources for this effect. Its a very popular one, atleast in recent demos and intros (in software, not many hardware acc. demos use it). If you''ve seen "heaven seven" or "past" by OJuice, you''ll know what i mean. Text, images or even the whole screen is blurred horizontally, from almost no blurring, to 100%. By horizontal, i mean that it only blurs the current scanline, it doesnt seem to account for the pixels above or below. But blurring isnt that hard.. What i cant grasp is the fact that the image also seem to be stretched along the scanline. Anyway, does anyone know how to do this? And how on earth do they manage to perform it so fast? I always though that blurring the whole screen would suck up most of the cpu-time.

Share this post


Link to post
Share on other sites
Advertisement
Do you want to do this in hardware or software? If it's software, then you'll want to be coding your blur routine in ASM using MMX. If it's in hardware, then you can use some tricks.

One such trick is to render your scene to smaller texture, and then render a quad the size of the screen mapped with that texture to the screen. The smaller the texture, the more blur.

If you want motion blur, there's a technique you can use that is very fast, but, for which, according to the OpenGL (and I assume DirectX) specifications, the results are undefined! That is simply to not clear the framebuffer but instead to render a semi-transparent quad to the screen that is your background color, and then render the current frame. The assumption is that the framebuffer will contain the previous frame. But it is not quaranteed to. So, although the technique is likely to work, it won't necessarily.

Edited by - TerranFury on September 4, 2001 10:13:14 AM

Share this post


Link to post
Share on other sites
This is a fairly easy effect to do in a demo; look at tutorials on convolution matrices for more info.

It''s important to recognize, tho, that this technique is limited. It''s completely possible to have an imgae get more and more blurry... it is not so possible to have the image very blurry to begin with, at least in realtime. And it''ll only work for static images. To produce an appreciable blur without a need for several frames for it to get blurry, you''ll have to use a rather large convolution matrix, which is very very processor intensive and probably cannot be done in realtime.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks for the help. Its in software. And i think maybe convolution matrices is the solution. I''ll look into it

Share this post


Link to post
Share on other sites

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