Shadows from and onto alpha quads

Started by
6 comments, last by Leo_E_49 18 years, 1 month ago
I am aware of both stencil shadow volumes and shadow mapping, although I have never had the opportunity to implement either. I am wondering how either of these techniques could be applied to generating shadows from alpha blended textures on quads. For example the leaves on a tree may be alpha quads, how would you generate the shadows of these leaves to apply to the trunk and branches of the tree as well as the ground beneath the tree. Also, is it possible to apply shadows to the alpha quads themselves?
Advertisement
with shadow volumes this isn't possible. You need actual geometry. With shadow maps this isn't a problem. Just render your alpha tested quads to the shadow map, and you have your correct depth stored normally.

Regards,
Kenzo
Thanks for that explanation. :)
Please note that only alpha TESTED triangles could be used for shadow maps.
There's no (fast?) way to cast shadow from alpha BLENDED triangles (smoke etc).
As for the leaves one could argue if using alpha test in cosidered "isn't a problem", me myself thinks that using alpha testing gives a lot of aliasing artifacts when combined with shadow maps.
However it's still the best (speed/quality wise) method out there.
I see what you mean, rendering an alpha value onto the depth buffer wouldn't be possible when it comes to shadow mapping. Just an on or off value. Wonder how you go about doing shadows for smoke. :P
Quote:Original post by Leo_E_49
Wonder how you go about doing shadows for smoke. :P

Deep Shadow Maps

How about using something like a "color map" for every light. Essentially I mean a texture to render the alpha blended primitives to. Perhaps you could do the following:

- Fill the render-target with white
- Render the alpha-blended primitives using multiply as blending operation
- use the resulting "color map" to determine the light color at a certain point, if the shadow map lookup results in a lit pixel

Haven´t tried that yet, but it could work, I guess. Just an idea, though.
Quote:Original post by AndyTX
Deep Shadow Maps


Thanks, that was a really interesting read (only skimmed through, but I will read into it further later). I'm impressed with the work done by that paper indeed.

This topic is closed to new replies.

Advertisement