   Shadows for trasparent surfaces
  What is the best way to project shadows off a surface like grass (which is a single plane with a alpha mapped texture) ?  Can i do such a thing within a shader,  and where should i look?   
  I don't follow... Are you casting a shadow from something onto the grass? If so, look into stencil shadows, they're the simplest and are perfect for flat surfaces.   ;  not exactly, lets say we try another example. i have a tree,  the trunk and the leaf planes (formed of a texture with many leaves painted onto it and a alpha channel to cull out the unused portions.) I could just set the tree in the land scape and stencil shadow it,  but then the leaves shadows wont look right on the ground,  they would just be a black squar.  I want the leaf planes to emit a shadow onto the ground that is more natural (in other words where it looks like light passed through the leaves.   ;  In this case stencil shadows obviously won't work. Instead take a look at shadow mapping(google for more). There are a bunch of variations of shadow mapping out there, so just search around a bit and I'm sure you will find the one that suits you the most.(keywords: variance shadow maps, perspective shadow maps, light-space perspective shadow maps, classic shadow maps)   ;  Something you could try (This is just off the top of my head): Make a matrix that will project your object onto the y=0 (ground) plane, as you would for rendering a stencil shadow, and set the alpha for the leaves (Either as a vertex constant or using another texture [or hte same texture?]) to some value, then render the tree with additive blending. Then (intheory), the leaves should add their alpha together and result in a darker colour where more overlap. The trunk could have al alpha of 255, so it's completely opaque.Again, that's just off the top of my head, I've no idea if that'd work...   ;  I think it actually can work, additionally If coded properly It could look decently as well. However, the major drawback of this approach is the fact that the shadows are planar, so it won't cast the shadow onto anything other that the plane itself and not self-shadowing as well.   ;  I've been attempting to add Stencil Shadows to trees for a bit now.The latest method I tried was to create two seperate volumes - one for the solid objects (trunk and branches), and one for the leaf canopy (a volume in which all the leaves are in).I was then going to create a shadow volume for the leaf canopy, and when darkening the area that is shadowed - I intended to use a texture of a mixture of shadowed and lit areas, like how the ground would look under a tree.I didn't have the time to finish it, since I ran into a problem writting the edge detection code, but I think it would have provided good looks and ran pretty fast.Just something to consider :)   