Hey Jon, first of all, those images are absolutely amazing... I love the concept of what you're doing. Being faithful to scales is essential if you want your planetarium to give a real feeling of the incomprehensible distances and sizes of stellar objects. Plus, this being done online and with Away3D, I love it! Please keep us posted when (and if of course) this comes online.
I've mounted your class into a project, tweaked it in every possible way and I can confirm a few things: (I THINK THERE IS A BUG THAT NEEDS TO BE FIXED) - I inserted a global scale multiplier in your class and your extreme dimensions dont seem to be the problem. The test behaved exactly the same with scale ranges around 1*10pow2 all the way up to ranges around 1*10pow9, which is the scales you're using. - Your suspicion about "x, y coordinates of the Planet and the camera" being equal is close, but not exact I think. The real problem seems to be that the objects being analyzed for the phong material (that is, the light, the camera and the geometry with the material) are being treated in local spaces somewhere in SpecularPhongShader (long shot there). If the planet is in the center of the scene, you should notice that the problem dissapears. Rotation transformations seem to be taken into consideration but NOT translation transformations. The candidate for whose translation transformations are being ignored is the planet, i.e. the geometry carrying the phong material. - There is certainly a BUG, but it should be an easy fix (I'll give it a go, but if someone from the team more familiar with shaders has a look at this it should be much easier for him). - Because of the way phong lighting works, there is a problem you wont be able to eliminate: when the light, the camera and the planet are aligned with the planet on the middle (eclipse formation), the specular element of the light won't wrap into a ring around the planet, but will tend to accelerate without spreading towards what appears to be a random position on one of the edges. This is more sensible to angles the more the objects are aligned in such a way. This is no big deal though, it just meahs that you will need to recur to some other resource to simulate eclipse type lighting which are just 0.0001% of the cases... Glow filters maybe? For everything else phong shaders should be fine once fixed. I'll give it a go at fixing it, will post any findings here.
