The image you posted isn’t very clear in illustrating what the issue is. If “1 2 3 4” refers to 4 sprites, it certainly appears to me that the four are packed as tightly as they could possibly be packed, and there’s obviously not enough space on the sides for another equally sized sprite. What’s the issue?
Maybe it wasn’t the clearest picture, so here is a better one.
My point is exactly the black space around. Why are the images not scaled down to 0.5 of the original size (this would be 512512) so they would fit exactly into the 10241024 texture?
I think this is how it should behave because we are all working with power of 2, right?