• 13
• 15
• 19
• 27
• 9

# BasicEffect

This topic is 3581 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, I am creating a simple 3D representation of Solar system. When I draw a planet I set: effect.EnableDefaultLighting(); effect.DirectionalLight0.Enabled = false; So I get a nice sphere whose one side is illuminated and the other is not. When I draw the Sun, I don't do any operations (don't add code lines which are shown above) in order to get a sphere which is illuminated from all sides. But the result is that I get a sphere whose one side is illuminated and the other is not (like a planet). Maybe I should use effect.Clone() but I have no idea here. Please help me and provide a little code snippet how to solve this problem. Thanks in advance.

##### Share on other sites

You could try turning off the lighting for the sun like this:

effect.LightingEnabled = false;

This should make the effect forego any lighting calculations, making it seem as if the object is lit equally from all sides (which should be appropriate for the sun).