sample Code must be compiled on 32 bit for shadows to work. The reason is because CATranform3D cannot be cast as GLKMatrix4 on 64 bit.