PDA

View Full Version : Sttencil Buffer Shadow Overlapping



Sam Kovalev
03-29-2005, 07:09 PM
If i have more than a single one point light, how to create real-visible effect of the shadow overlapping? I suppose using glBlendFunc() but dunno how.Please help!

brinck
03-30-2005, 12:32 AM
You do a multipass solution:

For each light:
1. Clear the stencil buffer
2. Create a stencil mask from light 'n'
3. Add the light from light 'n' to the unmasked regions.

/A.B.