Jump to content
  • Advertisement
Sign in to follow this  
gandalf3373

OpenGL directional lights, shadow volumes

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

i am having some issues with directional lights. there is a url below. the first two pictures show a cube that has been very slightly rotated in the second picture from its position in the first. but notice how drastically the lighting of the material changes. this material even flickers when the cube moves. i know it is not the face vertex orientation, or the normals. the shininess of the material is at 10.0f as well. the problem only appears with directional lights in opengl, ( the w coord is 0 ). i know the faces are rather large but still the vertices are not properly lit it seems. are there any tips for using directional lights that i may be missing? http://contrarymotion.com/tests/examples.htm my second problem has to do with shadow volumes and directional lights. see picture 3, the side of the cube. the shadow volume is fighting with the surface of the cube. this is an implementation of the zfail technique, my main reference is the mark kilgard paper on the nvidia website about creating robust shadow volumes. i cannot see a problem with my code. is this a common issue for the volume and face of the model to be fighting for pixels like this? i can certainly show some code if need be, but i first wanted to see if anyone has experienced this before with this technique. i have no issues when using positional lights for both of the problems i have stated here. thanks jamie

Share this post


Link to post
Share on other sites
Advertisement
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!