Depth buffer also a texture

Should make room for some refactoring maybe?