Skip to main content
gamedev.net
🔒 Locked

Create triangle shadow

Started by starfleetrp Aug 30, 2006 at 7:33 PM 3 replies 650+ views
Original Post
starfleetrp
starfleetrp
Hi, I have been doing some reading up on creating a stenciled shadow volume in opengl. However form my understanding the volume needs to have a quadtilateral face. So my question here is how would I render a triangle shadow, since it has to be a quad for the stencil to work(from my understanding).
blaze02
blaze02
Using the stencil buffer, you render your geometry once to generate the shadow volume, and again to the scene. I see no reason that a single triangle will not work.
Beco
Beco
I cannot understand u exactly, I use stenciled shadow volumes in my application for a model that contains triangles and quads as well, and it doesn't matter what kind of primitive you project your volumes from. Obviously the side of the extruded volume will be a quad. But here is a very useful document about the topic:

http://www.gamedev.net/columns/hardcore/shadowvolume
starfleetrp
starfleetrp
Oh ok thanks, I asked a simular question to this in another forum (but more on the imlimentation)... not gamedev and they said you could only do it with quads, not triangle. This will make life a whole lot easier! Thanks for your replies.
conman
conman
For the stencil technique to work the shadow volume doesn't have to be build by quads! It can be build by triangles and every polygon you like...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.