Fix atlas generation for swapped resolutions.