Pixel Bender vs Stage3D, Stage Video and Starling

1.8k views Asked by At

Does Pixel Bender (2D) combine with Stage3D?

Namely:

Does Pixel Bender work on top of Stage Video (GPU accelerated video)?

Does Pixel Bender work on top of Starling viewport?

Thanks

2

There are 2 answers

1
TheSHEEEP On BEST ANSWER

I fear that the answer is no.

There is no high level shading language for Stage3D. If you want to write shaders for Stage3D, you'll have to use the incredibly ugly AGAL. I'm not even kidding, assembler code for graphical programming. Wtf, indeed.

By not offering a high-level language, Adobe is practically killing any ambitious 3D projects that want to be made within a reasonable amount of time. And trust me, writing AGAL code is anything but reasonable and fast. There are some Flash 3D engines like Away3D and Alternativa, which are fine, but even those come with their own premade shaders and if you want something of your own, good luck.

That said, there were some efforts to make some kind of Pixel Bender 3D, as you can see here. But the development has been halted since 09.2011, and the last version is something you have to compile yourself, which has no UI, etc. So, again, virtually useless. No idea what Adobe is/was thinking ;)

I'm unsure about Starling, but I would doubt that you could use PB2 shaders with Starling, as that would mean Starling has an own parser for (old) PB2 code. But no guarantees here.

1
sHTiF On

The question is not clear, as to if pixel bender shaders can be used as shaders for Stage3D stuff nope. As to if pixel bender can be used in conjecutive with Stage3D yes although it will be at heavy cost.

You can have textures generated by pixel bender and then uploaded to GPU, you can have Stage3D content rendered to bitmap data and then processed by pixel bender etc.

As for AGAL its incredibly easy to use I don't see what the problem is even quite complex shaders like self shadowing parallax specular bump mapping is not that of a hurdle to overcome. Its not like you are going to write the game itself in AGAL :)