Sign in to follow this  

OpenGL directional lights, shadow volumes

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? 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this