• Runtimes
  • How to benefit from Premultiplied Alpha

I've been hearing a lot about how you can reduce batch flush with additive blend mode and pma. Nate mentioned it in http://vi.esotericsoftware.com/forum/LibGDX-Alpha-Fading-with-Premultiplied-Alpha-9367:

PMA also has the advantage that it can do additive blending without a batch flush while non-PMA requires a flush to change to additive and another to change back.

However I am struggling to understand the concept of it. I checked https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/BlendMode.java and it seems that whether pma is involved or not changing from Normal to Additive still require changing destColor from GL_ONE_MINUS_SRC_ALPHA to GL_ONE, isn't that a state change and trigger a batch flush?

Related Discussions
...
  • Изменено

I got this working! This thing is amazing. Thank you