Jump to content
  • Advertisement
Sign in to follow this  
karx11erx

OpenGL problem with culling of shadow volume side faces

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

While implementing volumetric shadowing (z-fail and z-pass) I have run into a big (for me) problem: Some of the volume's side faces are culled when they shouldn't. Some side faces that are front faces are considered back faces and vice versa. It has something to do with the vertex order of the silhouette edges. If I create the additional vertices for the face by extruding the edge vertices to infinity, it simply depends on whether I render the face in the sequence v0,v1,v1_inf,v0_inf or v1,v0,v0_inf,v1_inf, but this is somewhat random. I have no clue how to fix this. Experts, please help me. :) One hint: My program does all transformations by software, and I am using transformed vertices for these calculations. OpenGL rotation matrices are all identity matrices, and the translation vector is (0,0,0). Example: Here are two adjacent quads of my model: 0 -> 1 ^ . . | | . . v 3 <- 2 3 -> 2 ^ . . | | . . v 5 <- 4 So the vertex order for quad 1 is 0,1,2,3,0 and for quad 2 5,3,2,4,5. Depending whether I happen to process quad 1 or quad 2 first, their common edge will have the vertex order 2,3 or 3,2. This is breaking my shadow rendering. [Edited by - karx11erx on November 27, 2006 11:04:26 AM]

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!