Tonight, I enhanced the tool (codenamed TexTorture, hehe) with a little rectangle packing algorithm. Taking an unsorted list of sprites (i.e. rectangles), the outcome is already quite lovely. Next, I will try how presorting of the rectangles by width, heigth or area will affect the result. Finally, I want to be able to merge n input textures into m output textures, where m<<n, hopefully.