Most Flash 3D engines use a clever technique called normal mapping to compensate for the lack of mesh detail. How could a normal map be used for Phong shading? We already have all the normals we need, the only problem left is the shininess exponent, that would have to be computed per pixel. My solution follows.

Earlier this year Grant Skinner organized coding competition. The task was particularly simple: to code something cool in ActionScript using at most 140 characters (whence the name, tweetcoding). As everybody else, let me talk about my submissions a little bit, too.