I'm sure it's already somewhere...

But I hit the 200 result limit, even when I refined my search as much as possible.

I just wanted to verify what I think is the correct way to handle multiple lights with stencil shadow volumes.

</font>[ol]
[li]Render to z-buffer[/li][li]for each light source[/li][ul][li]<font size=“2” face=“Verdana, Arial”>calculate shadow volumes[]draw them to stencil buffer[]draw lighting with depth test at GL_EQUAL, blended with (GL_ONE,GL_ONE)[/ul][/li]</font>[li]draw final texture pass[/li][/ol]<font size=“2” face=“Verdana, Arial”>The only bit that I wanted to verify was the lighting pass. Is that the right way to handle that, or am I mixing bits and pieces together the wrong way?

You can transport a step_3 in a step_1.

The plan was to add all of the lighting contributions, then use GL_MODULATE for the final texture pass, I left it out to simplify the flow chart.

But the chunk for the lighting contributions is correct? That’s really the only bit I was worried about.

My only other question is in regards to fragment shaders. Will blending still work correctly if I use a shader, or will I have to implement that on my own as well?

I think what the chunk for the lighting contributions is correct. And blender would be working correct.

http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm

If number of lights is one, then the object who shadowed is black. But ambient or emission light?

The ambient will go in the first pass, if it’s needed. It’ll be determined per-scene, depending on the environment.

Thanks for the replies everyone, I’ll probably be back with more questions later, but ta-ta for now.