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

how to force square sprite atlas?

Discussion in '2D' started by herb_nice, Apr 16, 2022.

  1. herb_nice

    herb_nice

    Joined:
    May 4, 2017
    Posts:
    170
    is there a way to force a square sprite atlas short of adding dummy data to pad it out? a rectangular sprite atlas causes problems with some specific shader trickery.
     
  2. herb_nice

    herb_nice

    Joined:
    May 4, 2017
    Posts:
    170
    ended up adding a 257x257 pink dummy square, but there must be a better way.
     
  3. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    618
    Hi, certain texture formats require/enforce power of 2 sized textures. Other than that there are no option to force that right now. We will take a look into considering this as an option.
    You may want to try adding both 1 x N and a N x 1 sized sprite to Atlas to minimize wasted space and to ensure you get N size square atlas if all sprites can fit into that. Thanks