Posts Tagged ‘PixelBender’

Pixel Bender Differences

Friday, February 11th, 2011

I’ve been using Pixel Bender for some projects of mine (SquishFilter, Voxel Renderer). It’s been quite fun to write the pixel bender scripts, but the flash implementation is crippled (no functions, no loop constructs) and behaves diffrent than the gpu and cpu implementations on windows atleast. I’ve found two things:

First: normalize( float2 ) is not giving the same results in flash as gpu/cpu versions. In the flash version I had to replace the function with float2 / length(float2)

I wanted to set the alpha of a pixel4. when the color was pure green (0.,1.,0.) alpha could be set to anything. but when I sat the color to (0.2, 1.0, 0.2) and the alpha to something low as 0.3, the color got gray. What’s up with that?

Also, check this out:
Some Flash Pixel Bender performance tips + benchmarks

SquishFilter 0.1

Monday, January 10th, 2011

This is a demo of the very first version of my SquishFilter for flash.
SquishFilter 0.1

In this demo I’ve animated a wooden box in the timeline. In as3 I added the Pixel Bender filter (that I wrote) in the filters array of the animation. The filter is making the movieclip bulge and pinch when scaleY is more or less than 1.