Well, how about ShadowMap example from DirectX SDK?