1

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

daniel.sedlacek
  • 8,129
  • 9
  • 46
  • 77

2 Answers2

2

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.

TheSHEEEP
  • 2,961
  • 2
  • 31
  • 57
0

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 :)

sHTiF
  • 9
  • 1
  • AGAL incredibly easy to use. Yeah, right ;) Then write that self shadowing shader in AGAL and in CG, then compare both. If you still think that AGAL is incredibly easy, fine for you. But be assured that almost everyone will disagree. I'm not saying you can't write shaders in AGAL. It just takes much longer for everyone not comfortable in writing assembler code. And which Flash programmer is comfortable with such a rarity? And even more, who wants to become comfortable when there are alternatives like Unity, etc.? – TheSHEEEP May 30 '12 at 10:55