added support for texture atlases