Thats why I also made a shadowmapper for the terrain.
A basic mehtod would be to just paint the shadow onto the terrain. But you actually need a multitexture shader for the terrain then. (in case you want more than just the detail texture and the shadow)