Since PixelBender is becomming a more popular technology in the Flash ecosystem I decided to add first-class Apparat support for it.
As you might know I have done a couple of different tools for PixelBender already.
When I switched to Linux a while ago I had to discover that there is no compiler for PixelBender available and also no PixelBender toolkit. Even PBDT does not work on Linux since it requires a compiler.
In the current state Apparat can read and write PBJ files. I already implemented the format two years ago for the outline view plug-in. But this time Nicolas Cannasse’s great work on the hxformat library was my reference.
I will add two optimizations specific for PBJ files. TAAS will not be used here since it is only an unnecessary overhead. You do not have to crack a nut with a sledgehammer. The PBJ format is already register based and has certain useful invariants.
To cleanup some mistakes of the PixelBender compiler I will add:
- Copy propagation
- Dead Code Elimination
The compiler is not bad. Compared to the ASC it is a beauty of technology that makes use of the LLVM. However I think there must be some mistake in the code since unnecessary registers are used (Note: I doubt this is LLVMs fault but more the way how methods like sampleNearest are bound by Adobe). This can be solved with the simple optimizations I will add.
I will add some more things as well like a GLSL conversion or a DSL to write PixelBender kernels in Scala. If we get lucky this will also lead to a true cross platform opensource compiler for the PixelBender language. I think I will name that compiler Hydra :P
2 Comments
There seems to be Hydra is the code name of the Adobe PixelBender Language.
Awesome! It’d be really cool to port GLSL to Flash.
One Trackback
[...] This post was mentioned on Twitter by Mike Chambers, Joa Ebert, Claus Wahlers, David Tucker, Vaclav Vancura and others. Vaclav Vancura said: RT @joa: PixelBender Support In Apparat http://blog.joa-ebert.com/2010/09/07/pixelbender-support-in-apparat/ [...]