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

GetPixel-compatible formats for all iOS devices

Discussion in 'iOS and tvOS' started by PanicEnsues, Oct 18, 2020.

  1. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    185
    I use GetPixelBilinear to read from several textures. Works fine on Android & PC with their default formats (RGBA Compressed ETC2 8 bits & RGBA Compressed DXT5, respectively).

    But on iOS, if I use the default format (RGBA Compressed PVRTC 4 bits) it errors with "Unsupported GraphicsFormat(117) for GetPixel operations." I switched to the Compressed ETC2 8 bits format and it worked fine on my handful of test devices, but fails with the same error on a tester's iPad Pro.

    Does anyone know of a compressed format that is GetPixel-compatible on all iOS devices? (I'm sure I could RGBA32, but the memory required would lead me straight down crash alley.)

    Thanks!

    -Scott
     
  2. magnusfox

    magnusfox

    Joined:
    Nov 7, 2014
    Posts:
    26
    Hey, did you ever get an answer to this somewhere?
     
  3. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    185
    No, unfortunately. The compromise solution I settled on was to use RGB16 format, which seems to be compatible on every device I've tried so far, but eats up an eye-watering 8MB per 2k x 2k texture. But since I only need to load two of them per level, I think it'll be okay.
     
    magnusfox likes this.
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    >>I switched to the Compressed ETC2 8 bits format and it worked fine on my handful of test devices, but fails with the same error on a tester's iPad Pro.

    this should not happen. Can you create small repro project and bug report it?
     
  5. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    161
    same issue here. "unsupported GraphicsFormat(117) for GetPixel operations." in IOS platform in editor. The error message in console has no links nor any useful info for debugging.

    I am also using GetPixelBillinear in the project. not sure if that's where it's coming from

    Also fixed when changing textures to RGBA 32