PDA

View Full Version : I'm sure it's already somewhere...



PaladinOfKaos
11-17-2005, 10:12 PM
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>
Render to z-buffer
for each light source
<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)
</font> draw final texture pass
<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?

Racoon
11-17-2005, 11:11 PM
You can transport a step_3 in a step_1.

PaladinOfKaos
11-17-2005, 11:18 PM
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?

Racoon
11-17-2005, 11:46 PM
I think what the chunk for the lighting contributions is correct. And blender would be working correct.

Vexator
11-18-2005, 02:14 AM
http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm

Racoon
11-18-2005, 03:52 AM
If number of lights is one, then the object who shadowed is black. But ambient or emission light?

PaladinOfKaos
11-18-2005, 07:21 AM
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.