Tutorial 16 from http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/