Added support for arbitrary-size textures