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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Android texture formats on GLES2 devices

Discussion in 'Android' started by Gaspar, Jul 13, 2016.

  1. Gaspar

    Gaspar

    Joined:
    Jun 14, 2014
    Posts:
    28
    Hello.
    I am bit confused about texture formats i can use on old(gles2) android devices.
    I have sprites with alpha and format setted to "automatic compressed".

    By default its setted to ETC2. So on old devices unity unpacking all textures on start. Its very slow and takes a lot of RAM.
    If i set Texture Override to ETC in build settings- its still ETC2. According to the docs it should be RGBA16. I posted a bug about it(case 813678), but now its not working.
    I can set Texture Override to ETC and set "split etc1 with alpha" but its not working with UIImage. Its known bug but still not fixed in 5.4.0b25.

    I can set format for my texture to RGBA16 manualy, but there are hundreds of textures in project and i have to change each to RGBA16 for build gles2 and then to etc again to build gles3.

    Did i missed something? How can i change textures format to something supported gles2?
     
  2. r-pedra

    r-pedra

    Joined:
    Dec 4, 2015
    Posts:
    104
    Are your textures power of 2 ?
    ETC may ask for textures that are power of 2
     
  3. Gaspar

    Gaspar

    Joined:
    Jun 14, 2014
    Posts:
    28
    Yes, my texture power of 2. Its also can be reproduces with SpritePacker atlases.
     
  4. r-pedra

    r-pedra

    Joined:
    Dec 4, 2015
    Posts:
    104
    This is what it looks like on my side. But I'm not using the alpha option. I use a duplicated texture with Alpha 8 mode
     

    Attached Files:

  5. Gaspar

    Gaspar

    Joined:
    Jun 14, 2014
    Posts:
    28
  6. r-pedra

    r-pedra

    Joined:
    Dec 4, 2015
    Posts:
    104
    That is what I've done, I know. This was to compare with your own image.
    And Unity select automatically ETC2 when you are using default compression.
    In the build screen, the format you choose, is the format that will be used during compilation, it is not the format the editor will use. You have to change to ETC1 explicitly for each texture.
     
  7. Gaspar

    Gaspar

    Joined:
    Jun 14, 2014
    Posts:
    28
    This option changes format not only for editor. I checked it. I cant set pvr and i see pvrtc in preview window in editor. I can set etc1 and it will be etc2 on the device. Thats what confusing me. I have to change all textures format for each one.
    I still think that setting override to ETC1 should get us rgba4444 format for transparent textures.