Changed maximum attachable textures from 32 to 16. This is hard-coded at the moment but should be retrieved from the render system instead.