Fixed the shadows to work on square textures. Things are a bit wonky with the quality of the shadows however. I think this just means that I need to increase the resolution of the square meshes.