This is Papervision3D 2.1 demo. I try to run faster flat shading.
Main logic is these steps.
[1] make Array of BitmapData as chache
[2] check z-axis of allĀ faces
[3] calculate radian between z-axis of face and z-axis of target direction
[4] replace bitmap from cache data depend on radian.
Compare Flat Shading
Case of Build-in FlatShader
Case of Custom Flat Shading
detail description is posted at Japanese blog.