you dont seem to get it, you cant make a shadow mapping shader, thats not what shaders do. you really need to get a little more expirienced before you think your ready to make your own dynamic shadow solution.