Is it advisable for my individual texture regions inside this texture to be power of two, or that won't make any difference?

I've read on several places that it's recommended to use power of two sized textures (e.g. Should I use textures not sized to a power of 2?).

  • \$\begingroup\$ Depends on a lot of things. Read up on your platform. For example, must be power of 2 for PVRTC compression on iOS. \$\endgroup\$ – Almo Jan 17 '16 at 21:53
  • \$\begingroup\$ @Almo I'm targeting Android (just added the tag) for now, but I may target other platforms later on. I'm interested on whether the common advice of having power of two textures also applies to texture regions, not whether that advice applies to some particular device or platform. \$\endgroup\$ – Juan Jan 17 '16 at 22:04
  • \$\begingroup\$ Which is exactly why this question is too broad for the site. \$\endgroup\$ – Almo Jan 17 '16 at 23:01
  • \$\begingroup\$ @Almo OK, let's say I'm targeting Android only, would that make it specific enough? \$\endgroup\$ – Juan Jan 17 '16 at 23:09

The texture regions inside don't need to be powers of two.

But texture compression cells are often 4x4 so you have to be careful when using compressed textures that the edges of two texture regions don't share the same cell or they'll be compressed together which will degrade the quality if they have different colors.

You should leave a N pixel border around your regions where you extend the colors outward. Where N is 4 for compressed textures and a multiple of that if you're going to be using mipmaps.

So the compression, interpolation and mipmap don't draw using neighbor texels that are the wrong color at the seams.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.