• Runtimes
  • Spine Flutter (pre-multiplied alpha)

Hi - I'm working with Spine in Flutter it was incredibly easy to get started with using your demos so thanks heaps for that. I read that we can't use pre-multiplied alpha with Flutter so I have 2 questions:

  1. Does that mean we only get 1 alpha channel?
  2. Does that mean I can safely edit the exported PNG in PhotoShop?

Thank you!

Related Discussions
...
  1. When working with Flutter and Spine, if you cannot use pre-multiplied alpha, you will be using straight alpha instead. This means you still have an alpha channel, but the RGB values are not pre-adjusted by the alpha channel. So, you do get one alpha channel, but it is not pre-multiplied.

  2. Yes, you can safely edit the exported PNG in Photoshop when using straight alpha. Since the RGB values are not pre-adjusted by the alpha channel, you can manipulate the image without worrying about the complications that come with pre-multiplied alpha.

For more information on the differences between pre-multiplied and straight alpha, you can refer to the documentation on [PMA and straight alpha workflow](https://esotericsoftware.com/spine-unity#Advanced

Just to confirm - without pre-multiplied alpha, we only get 1 depth of transparency instead of the usual 256?

  • Pharan ответили на это сообщение.

    Both PMA and non-PMA have 256 levels of transparency. The difference is in blending -- how transparent colors are applied on top of other colors. While straight alpha is usually acceptable, PMA is more correct and has an advantage in most game toolkits in that additive blending doesn't need a batch flush.

    PABretherton

    Premultiplied alpha (PMA) is a special kind of alpha blending setup. It requires colors to be stored in a special way, different from how regular images on the internet are usually saved. Saving for PMA makes images look weird when you open them in a browser or image editing program, because they're only meant for rendering in a specific way.

    Many modern programs and frameworks (assuming they did their homework) will handle the details of PMA for you so you don't have to do anything special. It lets you save and use images normally while it internally does PMA to account for quirks in rendering.

    Without PMA means you'll be saving and editing regular images as you commonly would. And you can import and edit and export PNGs normally.

    I think you were also imagining that the transparency becomes like a GIF where the pixels can only be fully opaque or fully transparent. This is not the case. These are regular PNGs. They will be rendered like PNGs as you expect unless you explicitly program it (in Flutter) to render in a different way.

    Honestly love you guys and your first class customer service!