Got proper lighting to work. Normals are a little bit screwed at the moment though. On the bright side, I've written the subdivision surface code. Now I just need to debug it.