开发者

Pixel bender shaders with multiple outputs in flash?

According to the pixel bender specs a shader can have one or more outputs. The pixel bender toolkit, whose "export to flash" option tends to be preety strict about the flash specific do's and dont's, would even compil开发者_StackOverflowe such a shader without complaints.

However actionscript's shader related classes seem to be geared toward single output shaders. Is there any way to have multiple shader outputs in flash?


There are some workarounds, listed from easiest to hardest.

1) Use different channels (if you have grey-scale outputs)

2) Double the output width, then do copyRect on the bitmapData to separate them. (assuming that's what you're using)

3) I haven't tried this yet, but it shows some promise, and is the closest to what you want: Use pixel bender assembler to specify two outputs. More info is here: http://www.adobe.com/devnet/flex/articles/flashbuilder4_pixelbender_06.html http://www.ncannasse.fr/projects/pbj (Haxe-specific, but has useful general info)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜