Sundy
03-23-2002, 01:34 AM
Hi,
I am trying to figure out if I am doing the right thing to generate shadow volumes using carmack's reverse, Could somebody here help me?
This is what I do, but it does not work correctly
glDepthFunc(GL_LESS);
glStencilOp(GL_KEEP,GL_INCR,GL_KEEP);
...
1. Render the Front Facing polygons from the mesh
2. Render the Shadow Volume Cap (triangulated silhouette polygon at the far end of the shadow)
3. Render the Front Facing Shadow Volume Quads
glStencilOp(GL_KEEP,GL_DECR,GL_KEEP);
1. Render the Back Facing Shadow Volume Quads
This just dont work,
Could somebody please explain the right steps in this coz I somehow just cant visualize the Z-Fail case in my mind.
HELP!!!!
Thanks,
-Sundar
I am trying to figure out if I am doing the right thing to generate shadow volumes using carmack's reverse, Could somebody here help me?
This is what I do, but it does not work correctly
glDepthFunc(GL_LESS);
glStencilOp(GL_KEEP,GL_INCR,GL_KEEP);
...
1. Render the Front Facing polygons from the mesh
2. Render the Shadow Volume Cap (triangulated silhouette polygon at the far end of the shadow)
3. Render the Front Facing Shadow Volume Quads
glStencilOp(GL_KEEP,GL_DECR,GL_KEEP);
1. Render the Back Facing Shadow Volume Quads
This just dont work,
Could somebody please explain the right steps in this coz I somehow just cant visualize the Z-Fail case in my mind.
HELP!!!!
Thanks,
-Sundar