Improved implementation by using a texture atlas