I'm trying to make a realistic shadow effect by flattening my object's geometry onto a plane (using D3DXMatrixShadow) and I've got a small problem:
My object is a tree which uses alpha testing to render partially transparent leaf textures, and I'm trying to use this alpha test on the shadows too. It works OK in that the shadows cast properly, but as you can see, there's no transparency (they are solid black). I am applying a translucent black shadow material to the flattened meshes before rendering them (which you can see works for the shadows of the small plants which don't use alpha testing on the shadows), but they still appear solid:
So, my question is - how can I use my translucent shadow material alongside the alpha tested textures which I have also applied to the shadows (in order to render the leaves properly)? It all works fine if I remove the textures (as for the small plant's shadows), but then I can't see my leaves properly.