Jump to content
  • Advertisement
Sign in to follow this  
Cacks

Lighting my scene, half working

This topic is 4521 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

Hi guys, I have a scene, It is enclosed withing a cube. Each side of the cube is a grid of quads. I have added lighting; I place a positional light at the origin, the centre of my scene. But only 3 of the sides of my scene are lit. I think it is because I use one fucntion to draw a grid then translate & rotate them into the requred positions; 3 of my sides are rendered the wrong way around (the wrong winding). How can I enable lighting to light both sides of my grids? Thanks for any help given!

Share this post


Link to post
Share on other sites
Advertisement
Sounds more like the normals for the grid are opposite direction to what they should be for the face that is not lit. Double check the normals for the vertices first. You might be generating the normals and then of course your translation and rotation means they end up facing the wrong way. I have a habit of drawing them to convince myself they are correct, but for a grid this should be fairly obvious by just looking at some debug output.

F451

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!