A few months ago i made a filter in PixelBender Toolkit for use in flash.
This filter is named: FuzzyDistort; it distorts an image in a fuzzy way.
Demo:

–
Download here: FuzzyDistort.pbj
–
And heres the code ( it says ‘actionscript’ but its actually PixelBender code ):
View CodeACTIONSCRIPT | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <languageversion> /***************************************************************************** * * Author: Robin Kollau * http://blog.rackdoll.nl * Contact: rackdoll -at- gmail.com * *****************************************************************************/ kernel FuzzyDistort < namespace : "Your Namespace"; vendor : "Robin Kollau"; version : 1; description : "Distorts the image in a fuzzy way."; > { input image4 src; output pixel4 dst; parameter float Amplitude < minValue: float( 0 ); maxValue: float( 25 ); defaultValue:float( 0 ); >; parameter float Multiplier < minValue: float( 1 ); maxValue: float( 25 ); defaultValue: float( 1 ); >; void evaluatePixel() { float2 xy = outCoord(); xy += Amplitude * cos( xy.yx ) * Multiplier; dst = sampleNearest( src, xy ); } } </languageversion> |
–
Have fun!

The [PixelBender] FuzzyDistort filter by Script.it, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Netherlands License.
