basing on some experiments some time ago with pixel bender kernels i was able to render a few spheres with local illumination for one light source based on phong:
- ambient illumination (as a substitute for all indirect light bouncing around in the scene)
- diffuse illumination (lets parts of the surface pointing to the light source be lighter than those pointing somewhere else)
- specular illumination (adds highlights - you can simulate different materials with that by playing around with the parameters)
that’s phong. its all that gets calculated for each pixel. and that’s a lot.. you can see that pretty soon as you add spheres.
even with a multicore cpu (which is finally supported by flash player 10, yay!) you’re happy to reach a bit over 30 spheres without heavy frame drops.
well. of course a shader isnt the best way to render a sphere because you could do lots of stuff iteratively using the previous calculations. that’s a thing you cannot do with pixel bender at all - you don’t know in which order the shader runs through the image.
but that is another topic
the current release of flash 10 is needed for this and further examples!

