What's the exact blending operation that blend_premul_alpha shader mode applies to pixels?
blend_premul_alpha render mode
Asked Answered
premul_alpha
is premultiplied alpha.
When the alpha component is equal to 0, it behaves as an additive blend mode. When the alpha component is equal to 255, it behaves as a mix blend mode. Anything between will be a mix between an additive and a mix blend mode.
You can read more about premultiplied alpha here: https://limnu.com/premultiplied-alpha-primer-artists/
So it's a blending mode used to "properly" draw textures that are already premultiplied? Equivalent to opengl's (GL_ONE, GL_ONE_MINUS_SRC_ALPHA)?
@xyz said: So it's a blending mode used to "properly" draw textures that are already premultiplied? Equivalent to opengl's (GL_ONE, GL_ONE_MINUS_SRC_ALPHA)?
Yes :)
© 2022 - 2024 — McMap. All rights reserved.