Saturday, November 8, 2008

MotionBlur filter

View online

Download source
(You'll need the latest release of FlashDevelop 3 to open the project)

As you all know, the BlurFilter in Flash can only do horizontal and vertical blur.
This MotionBlur Pixel Bender filter can do blur of all angles.
I used only 5 levels of blur in the filter for Flash Player efficiency consideration.

Actually the same effect can be done completely using the original BlurFilter.
All you have to do is use BitmapData.draw() to take a "snapshot" of the rotated image.
Then apply a BlurFilter on the BitmapData.
Finally, use another Bitmap.draw() to take a snapshot of the "righted" blurred image.

1 comment:

Anonymous said...

Awesome !