Why does the lighting of the moon always shine on the face which faces the planet as it rotates? [See picture] In lit.fs, I give the same light direction for both planets. It seems that the moon's lighting is coming from the planet (the origin). Where could be the problem?
It's more likely that the problem is with your normals than with your light direction. For example, keep in mind that snap_to_sphere.tes should output normals in camera space.
Why does the lighting of the moon always shine on the face which faces the planet as it rotates? [See picture] In lit.fs, I give the same light direction for both planets. It seems that the moon's lighting is coming from the planet (the origin). Where could be the problem?