« What does the Googl... FDT does work in Li... »

Some new Flash 10 Shaders for realtime effects... and maybe a Shader bug?

Sep 1st, 2008

Another thing I can get rid from my to-do list. My introduction to the Pixel Bender/Flash10 Shaders world. Yesterday afternoon I decided to give it a try and see how all this worked

First thing was setting up FDT to compile Flash10 movies, something that ended up being quite easy thanks to this post. By the way, in case you're wondering... FDT on Ubuntu seems to be doing very well, no problems so far. Unfortunately I had to go to Windows in order to do the Pixel Bender part.

Dealing with Pixel Bender was kind of fun, although I was missing a timer (incremental) value, something to easily test my filter moving. Maybe there is something for it already but I just didn't find it on the few hours I played with it.

Once the filters were done I tried them with Flash10, and then that Tinic post popped into my mind and realised how slow it was (compared to the Pixel Bender). I'm sure the filters can be optimised but I just left them easier to understand so whoever feels like can start playing with the values. However, they are fast enough for 512x512 action or for fullscreen single frame distortion.

Ok, show time... Before you click in any of these things:

1) Flash Player 10 is needed.
2) There seem to be a bug on Flash 10 Shader code, on Pixel Bender the Shader looks fine, but it doesn't in Flash 10. I hope someone can spot if it's my code's fault or if it's actually a Flash 10 bug, I have no idea :S

EDIT: Tinic confirmed it was a flash player bug and seems to be fixes now. Looking forward to the next beta version available.

Hypno shader
.pbk (Pixel Bender file)

Planes shader
.pbk (Pixel Bender file)

Rays shader
.pbk (Pixel Bender file)

Rays 2 shader
.pbk (Pixel Bender file)

Sphere shader
.pbk (Pixel Bender file)

Star shader
.pbk (Pixel Bender file)

Tunnel shader
.pbk (Pixel Bender file)

Tunnel 2 shader
.pbk (Pixel Bender file)

Tunnel 3 shader
.pbk (Pixel Bender file)

Tunnel 4 shader
.pbk (Pixel Bender file)

Vortex shader
.pbk (Pixel Bender file)

Wave shader
.pbk (Pixel Bender file)

If you're wondering how I managed to do that many effects in just a couple of hours, here it's a hint... iq.

All the .as, textures and compiled shaders are here.

What to do now? Well, I would suggest you to download Pixel Bender load any of those .pbk files, find the line where it says // This is where the magic happens and play with the formulas there and make your own ones.

Have fun! :)

#permalink
Webs / Print / Logos... everything I do will be listed here.



If you're looking for my Actionscript experiments, here you have: