8
\$\begingroup\$

I'm thinking about texture atlas generation where I'd have to choose the dimensions of my atlas, constrained both by my sprites and by the maximum texture size of the current platform.

Given that, is there any drawback to using a rectangular texture over a square texture, assuming the dimensions are still a power of two? For example, is there a difference between using a 64x256 texture and using a 128x128 texture?

\$\endgroup\$
2
  • \$\begingroup\$ Related question: gamedev.stackexchange.com/questions/26187/… \$\endgroup\$
    – Dan
    Jan 13, 2013 at 17:12
  • 5
    \$\begingroup\$ For what it's worth I don't think the above-linked related question is actually a duplicate (there's a close vote against this question for exactly that reason); the related question asks why powers of two are used, this question asks for a drawback to non-square textures, and I don't think the answers to those questions would be the same. \$\endgroup\$
    – user1430
    Jan 14, 2013 at 21:20

1 Answer 1

4
\$\begingroup\$

Short answer: no, there's no drawback.

In early 3d hardware there used to be some aspect ratio limitations, where you could do 32x256 or 256x32 textures, but not, for example, 256x4. I have no idea why this limitation existed (probably to simplify interpolators or some such), but current 3d hardware has no such limitation.

Do note that small levels of mipmaps may act slightly differently in non-square textures (as an example, 64x8 - 32x4 - 16x2 - 8x1 - 4x1 - 2x1 - 1x1, I believe).

\$\endgroup\$
2
  • 2
    \$\begingroup\$ I'm not saying I don't believe you, but some documentation from the major vendors with that detail in it would be useful. \$\endgroup\$
    – Tetrad
    Jan 14, 2013 at 22:07
  • \$\begingroup\$ To think of the most extreme example, a 8192x32 texture wouldn't be significantly worse than a more square-shaped texture? Since I'm relating this to texture atlases, that case would be if I decided to be lazy and just arrange all my sprites in one long row. \$\endgroup\$
    – Aaron
    Jan 14, 2013 at 22:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .