I don't understand why you'd need a shader for the ImageBox demo, or why you would ever want to do that... it doesn't even look like it's working right. If we can't get a cool example, how about just a directional light shader or something basic?
Did you check out the cylinder sphere demo in the zip? It's texturing and phong shadeing on the material side and warping the
vertices on the vertex side.
I've attached a non-texture version of the meterial kernel used in an earlier version of that demo that focuses on the lighting.
To answer your question about why you'd want a shader for the texture box demo... like most modern 3D APIs (DirectX 9+, OpenGL 2+, OpenGL ES2), there is little fixed function shading or texturing capability baked into the Flash 3D (Molehill) API itself.
The texture box demo uses a shader to do its texturing because it must use a shader to do its texturing. You can author that shader in a variety of ways, such as directly coding the AGAL, but we think Pixel Bender 3D provides a less low-level, hair-pulling way to do it.
Modern, programmable 3D hardware is awesome and it completely transformed the way folks do 3D on the desktop. Mobile is next. Unfortunately, the initial ramp up with shaders is a bit steep.
Just to deal with the "not very inspiring" comment - we're engineers, not artists or designers so our demos tend to focus on showing off the capabilities of the system rather than looking great.
We're looking forward to seeing much cooler demos from the Flash community.
Sorry, that comment was confusing. I get why you need shaders to work with molehill, but I was wondering why the Pixel Bender 3D demo just slides pictures around, something that I think Flash did pretty well before.
Away3D has a high-poly face model rendered with SSS. To me this is both practical and very impressive visually. The Pixel Bender 3D demo can at least be practical, right? A simple phong shader is good, thanks.
Microsoft also does a good job with having their DirectX demos focus on a single technique, showing the advantage of using it clearly.
Thanks for the responses.
As Chuck pointed out, the cylinder sphere demo includes a phong shader - in fact the cylinder sphere demo shows off most of the capabilities of PB3D.
We're definitely going to have better demos by the time we get out of beta.
Europe, Middle East and Africa