I have an issue with shadows cast by object really far away from the light source. I am using the depth map approach for rendering shadows in my Solar System simulation. The sun is a point light source and I would like to observe the shadow of the moon on the earth. But since the moon is a really tiny object relative to the distance between it and the sun and since the depth map resolution is limited, the presence of the moon and earth are ignored when rendering the depth cube map texture.
Solar System Depth Map:
You can see that even with the size of the moon exaggerated, it only leaves a small footprint on the depth cube map. With this big of a moon, the eclipses do work but once i shrink the moon to its actual size it is no longer rendered in the depth map and because of that, no longer taken into account for shadow calculations. I am using a 4096 X 4096 texture. Is there a way to solve this problem or is my approach doomed to fail? Any help would be much appreciated.