PDA

View Full Version : Limiting the Size of Planar Shadows?



cpsmusic
01-26-2006, 03:06 AM
Hi,

I've implemented planar shadows (on the ground plane) and they work well, except that when the light source is near the ground plane the shadows become very long and stretch off to the horizon (as you'd expect).

Apart from using the stencil buffer to limit the size of the polygon onto which the shadow is drawn, is there a way to limit the size of the shadow. I'm especially interested in finding a way to make it fall off gradually.

Cheers,

Chris

jide
01-26-2006, 09:20 AM
I'm not totally sure to understand what you really want. Anyway, let's make a try.
This seems to be very difficult to do. What it seems you need is some blending according to the distance regarding to the position of the object that casts the shadow. And as you use stencil, I don't really see anything to do that.

Maybe the accumulation buffer could help you.