2-Texture blending shader with shadows

I’d like to add shadows to the following shader that blends two textures…

Got the base from here
http://wiki.unity3d.com/index.php?title=Blend_2_Textures

Unsuccessfully tried to add another texture to this one http://answers.unity3d.com/questions/688943/how-to-receive-shadows-on-a-simple-custom-shader.html

Using multiple quads with the latter didn’t help either, since it seems transparency and shadows
don’t mingle…

How could I fix this?

Shader "GroundWithOverlay" 
{
	Properties
	{
		_Density("Density", Range(0, 1)) = 0.5
		_MainTex("Ground", 2D) = ""
		_OverlayTex("Overlay", 2D) = ""
	}

	SubShader
	{
		Pass
		{
			SetTexture[_MainTex]
			SetTexture[_OverlayTex]
			{
				ConstantColor(0,0,0,[_Density])
				Combine texture Lerp(constant) previous
			}
		}
	}
}

Found a solution.

Uploaded it to pastebin for the sake of keeping this page readable.