Using texture stage states for shadows
I'm currently working on a tile engine and I want to create shadows w/o a lot of runtime overhead. I was wondering if I could use the Direct3D->SetTextureStageState() function to do this.
I'm using Direct3D to render the tiles as 2 triangles - a triangle strip and then texturing it with the correct texture. All other tiles are rendered as non-iso flat quads - again 2 triangles being textured.
If I have the first texture and the second texture, how can I overlay the first one onto the second, w/o obliterating the base tile? My idea is to overlay the silhouette of the object tile ( a tree in this case) over the base iso tile in such a way that when the colors are blended, the base tile shows a darkened silhouette of the tree tile. Hard to explain but I'm basicaly re-texturing the base tile with the shadow using texture stages. However it does not seem to be working at all. Either the first texture stage obliterates the second or vice versa.
Anyone have any ideas on how I might do this? Perhaps I could use a lightmap of the tree and texture that onto the base tile?