Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Non power of two sprite sheets

Discussion in '2D' started by ZimM, Jun 5, 2014.

  1. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Hi everyone,

    We know that generally textures have to be square with a side that is power of two, in order to leverage texture compression (DXT, PVRTC etc). But does this stands true for sprites when using Unity's 2D system? As I understand, all sprites are repackaged to the atlases during build by Unity, and that atlas probably has correct dimensions, so Unity is able to apply compression.
    So, the question is - am I right and it is ok to import non power of two sprite sheets? Are there any downsides to this?
     
    Last edited: Jun 5, 2014
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Sprites use normal textures, normal texture rules apply.
     
  3. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Your are missing the point about atlasing. All sprites are repackaged to atlases during the build (by default), so obviously they'll have correct dimensions after that, even if that can't be seen anywhere in the editor.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Only if you have Pro, and have enabled automatic packing for those textures.

    Sprite sheets, no...those should be power of two. Individual sprites can be whatever dimensions you want as long as you have Pro and are using automatic packing. If you don't have Pro then you should most likely be making atlases yourself, which you can slice using the sprite editor.

    --Eric