Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Is Astc Rgb Encode Gone?

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

  1. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    635
    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:
    5,298
    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:
    98
    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:
    316
    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.
     
    Jes28 and Charles_Beauchemin like this.
  5. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    98
    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.
     
    Jes28 likes this.
  6. Jes28

    Jes28

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

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    463
    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
    Jes28 likes this.
  8. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    316
    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 Jes28 like this.
  9. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    635
    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.
     
    Schmekz, 5argon and florianpenzkofer like this.
unityunity