So in one of my projects, I have a texture for part of the UI in my game. It’s a long divider, so the size of the texture is much bigger in one dimension than the other dimension.
Its size is 1024x56 right now, and I was wondering - is it bad that it’s not square, and that the height of 56 is not a power of two? Would it better for performance to make the texture 1024x1024 and have a lot of empty space?
Usually the “non-square attribute” is nowadays irrelevant. However on many weaker platforms NPOT (non power of two) textures might not be supported. In general it’s better to use power of two dimensions. Also keep in mind that mipmaps work best with power of two dimensions. Though for UI you usually don’t need mipmaps.
I would suggest you create a texture that is 1024x64. This is done by Unity automatically if you have imported the texture with the NPOT setting “ToNearest”. Keep in mind that your texture will be stretched in this case. Another way is to keep the actual content 56 pixels in height but add transparent padding space to get to 64. Though it highly depends on how and where you use the texture. For UI stuff it’s common to use a texture atlas.