Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


d3dx8 lighting woes/questions

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello.. I have problems with lights in my scene...currently exists of a skybox and a floor... The skybox and floor have proper normals defined (also normalised). With white ambient light on the scene, things appear very bright (understandably).. (Red) Directional Light say (1,0,0) appears to light all the planes of the skybox as well as the floor. I thought only the faces of the skybox facing the oncoming dir light would be litten....also in all the cases having ambient light "swamps" the scene and every other light doesnt get a change ;-) The same with point lights (with directional lights)....I have made the range very small but still we get everything in the box litten. With spotlights i cant see no effect....that is nothing is shown.. if anybody could provide some comments/help....I have looked at "tons" of examples and i dont do anything different. thanks c

Share this post

Link to post
Share on other sites
Ummmm... should you be lighting your sky box? Maybe you are just experimenting with lights, but normally I disable lighting when rendering the sky box. I mean I don''t exatly want my torch to light up the mountains

About your actual question: are you setting the light attenuation factors correctly? There are three, one for constant, one for linear, and one for quadratic attenuation. Play around with them and see what happens.

Hope that helps

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!