Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Is Astc Rgb Encode Gone?

Discussion in '2019.1 Beta' started by JesOb, Apr 12, 2019.

  1. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    In Unity 2019 ASTC RGB compression formats gone.

    Now we have RGBA LDR and RGBA HDR.

    How to encode texture to RGB format?

    https://prnt.sc/nb4gnf
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    But the "A" is in parenthesis, thus I would expect it encodes to ASTC RGB, if the source texture does not have an alpha channel. Have you tried this already?
     
  3. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    You can put "Alpha Source" to none on a texture with no alpha channel, and the preview of the texture will still label it as RGBA. It will also report its format as "RGBA_ASTC6X6_UNorm".

    However, there are no ASTC RGB-only formats in the GraphicsFormats enum which seems to be pretty exhaustive. I am assuming internally the format is encoding it without alpha to optimize the quality, but it would be nice to have some clarity.
     
  4. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    The ASTC format itself does not have a variant without alpha channel.

    If your source texture has alpha but you don't don't need it then just set "Alpha Source" to "None". This should give you the same behavior and quality as previous Unity versions.

    The ASTC RGB TextureImporterFormat was added to Unity basically as a workaround when there was no "Alpha Source" menu.
     
    JesOb and charlesb_rm like this.
  5. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    Thanks for the reply! It's good to know the quality/behaviour is the same. I know ASTC always decodes to RGBA, but the encoding can support any number of components so it would be nice to have more explicit control over that to get access to the single- or double-channel modes.
     
    JesOb likes this.
  6. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Slightly off topic but why I can not use ASTC compression for Standalone?
     
  7. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Do you have a computer GPU that supports ASTC texture compression? AFAIK there is no desktop/laptop hardware that supports it. The only hardware that has ASTC decode is mobile hardware.
     
    Last edited: Apr 17, 2019
    JesOb likes this.
  8. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Afaik some Intel GPUs would support ASTC on desktop, but then it also depends on Graphics APIs to expose it...

    At the moment the main difficulty with just exposing more ASTC format configurations is the TextureImporter Editor UI. The list of formats in the Android overrides is already too long.
    Probably we should split block-size/bitrate from the format for the UI.
     
    Shane_Michael and JesOb like this.
  9. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Bitrate and HDR will be very helpfull.

    And additionally it will be very helpful to have bitrate and format in form of selection grid instead of combo box.
    Fast sample: Screenshot_6.png
    We look onto object in scene and toggle different compression options to find best balance between quality and memory consumption.