Search Unity

Sprite Atlas always creates a texture with alpha, even if none of the source sprites doesn't have.

Discussion in 'UGUI & TextMesh Pro' started by Meceka, May 1, 2019.

  1. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    After seeing that Sprite Packer is now legacy, I tried Sprite Alpha feature and set up almost all the UI with it.

    However, Sprite Asset is missing a feature that the old system had.

    We have lots of non-transparent UI sprites. Mostly for tutorial screenshots and etc. To save space I added these to a separate sprite atlas just because they don't have alpha. But Sprite Asset packing doesn't realize that and creates a texture with alpha instead. And I couldn't find an option to pack non-transparent.

    I know the Override buttons would work but it's a complicated workaround to set up texture format for all the platforms we would support, I usually just select compression quality and leave the rest to unity, and I don't know which one is more suitable for a UI sprite.
    And those overrides get removed for example if the file is modified with for example a PC without Unity Android Support installed.

    I attached an image below.

    Is there an easier workaround for this?

    Unity 2017.4.24f1

    upload_2019-5-1_19-51-48.png
     
    Last edited: May 1, 2019
    nenun likes this.
  2. unity_cderochie

    unity_cderochie

    Unity Technologies

    Joined:
    Jul 28, 2022
    Posts:
    1
    Hi, @Meceka . I was wondering if you ever solved this issue?
     
  3. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hi @unity_cderochie

    No, I gave up creating a sprite atlas for these or similar sprites because of this problem.

    It means game will run slightly less optimized. They will not batch and as far as I know, there is a small cost of having multiple separate textures rather than one atlas for GPU as well.

    If there is no alpha in the imported source textures (For example RGB Compressed something), should create a texture atlas also without alpha.