I''m writing a flight sim, and I''m trying to get the shadow of the plane to map onto the terrain. (If it helps, the shadow is a textured square w/ transperency FX.) Is there any simple (or at least not overly complex) way to do this?
Find the triangles that might will be shadowed by the texture. You do this by parallell projecting the shadow texture and checking if the triangle is inside the frustum that the parallell projected edges make up.
Then apply the shadow texture on these, where you use the parallell projection to find the texture coordinates.
The vector that is used for the parallell projection is the light vector from the sun.