Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Blurring an image in D3D Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 26, 2005, 02:10 PM

Im trying to produce a decent blur effect. Im rendering a 512x512 image to a 64x64 texture and then im upsampling this back to 512x512. On the upsample i am performing a 7 pixel horizontal blur of the original image and then additively blending a vertical blur as well. This provides me with a nice star effect to the "blur". However, it looks terrible when moving. You can see obvious aliasing artifacts when the image moves. Can anybody explain to me a decent realtime blur algorithm? Pixel/vertex shaders are not a problem to use.


March 26, 2005, 02:32 PM

You should not do downsampling for a proper blur-effect. You should just apply the filter kernel at the actual image resolution, else you will lose valuable image information (downsampling will normally be done with either pointsampling or bilinear filter, which will not work properly when your ratio of scaling down is more than 2:1, because some pixels will be skipped altogether by the downsizing. If you do the downsampling in multiple stages, it may look better... but when you have to do multiple passes anyway, you may aswell just apply the actual filter directly).


March 27, 2005, 03:57 AM

Actually I got a nice blur by performing a 7 tap horizontal blur ont he down sized image and then blurring THAT image with a 7 tap vertical blur. Cheers for the advice though :)


March 27, 2005, 03:38 PM

"horizontal blur ont he down sized image and then blurring THAT image with a 7 tap vertical blur"

You've just discovered the concept of a separable filter =D

(Blurring horizontally, and then blurring the result vertically is the traditional way to accomplish a 2D blur, and can also be done with a variety of other filtering effects!)

This thread contains 4 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.