Update on 2014/01/04:
Many things changed since the original post was published. Now HaXe is 3.0 and HXSL reaches 2.0. So here is the updated source code of the example for HaXe 3 and HXSL 2:
https://flaswf.googlecode.com/svn/trunk/flaswfblog/Tutorials/HxSL2DShader/HaXe3HXSL2/
====================
Maybe you know how to use Pixel Bender in your Flash project to create some custom filters. Alternatively, with the new Stage3D API introduced in Flash 11, we can write 2D filters running with GPU. Here is the example:
hi.. just wanted to ask if this can run on ios? with the pixel bender pbj files?
ReplyDeleteThe example will run as a swf, so will not work on IOS, until HxSL can compile to IOS. However, the idea will work on IOS, because you can create apps using AIR and Stage3D. And please note that the above example has nothing to do with pixel bender, it is Stage3D.
DeleteHave you managed to get this example to run in Haxe3? With a little work, I got it to compile, but it crashes with an assert when I run it. Shame, because it's close to exactly what I need for my project :(
ReplyDeleteUpdated for HaXe3 and HXSL2:
Deletehttps://flaswf.googlecode.com/svn/trunk/flaswfblog/Tutorials/HxSL2DShader
P.S. It seems the line "c = int(c);" will cause some runtime error, I'm not sure whether this is a bug or something else.
The new link:
Deletehttps://flaswf.googlecode.com/svn/trunk/flaswfblog/Tutorials/HxSL2DShader/HaXe3HXSL2/
That is really very informative and useful blog. Need to keep this script for future reference. Thanks for sharing it and keep posting
ReplyDelete