RFE: Additional bits controling PPA blending behavior
Posted: Fri Aug 21, 2026 5:49 pm
We need additional bits for controling behavior of PPA blend function. Many images and image datasources comes with already premultiplied color value with their alpha channels. Simply those two standards (color premultiplied and color not premultiplied) exist for more than 30 years. So it would be nice to have bit which controls should Fg buffer be multiplied (it is default behavior of PPA blend function) or not, in that hardware built blending function. Simply in that case part within blending function Fg * Af should be skipped and only Fg used, as is, since it is already premultiplied by alpha value.
Second bit should control the same behavior for Bg buffer since it also can be premultiplied by its Alpha channel.
Third bit should control output result in a sense to do unpremultiplication by resulting alpha (default behavior in PPA) or to skip that division completelly, and leaving premultiplied values into resulting channels.
That can save a lot of duplicated blending just to manage to work with already premutiplied sources. Also, leaving premultiplied value in output buffer is extremely useful especially if that buffer goes in next stage of layer blending since their color is already multiplied by alpha so that multiplication can be skiped in next stage processing if, for example operation which has to be done is not supported by PPA so function running on core can omit that multiplication.
Those bits then can be also useful for achieving different blending modes like Additive (glows, highlights, blooms etc) and multiplicative (shadows, occlusions ....).
Second bit should control the same behavior for Bg buffer since it also can be premultiplied by its Alpha channel.
Third bit should control output result in a sense to do unpremultiplication by resulting alpha (default behavior in PPA) or to skip that division completelly, and leaving premultiplied values into resulting channels.
That can save a lot of duplicated blending just to manage to work with already premutiplied sources. Also, leaving premultiplied value in output buffer is extremely useful especially if that buffer goes in next stage of layer blending since their color is already multiplied by alpha so that multiplication can be skiped in next stage processing if, for example operation which has to be done is not supported by PPA so function running on core can omit that multiplication.
Those bits then can be also useful for achieving different blending modes like Additive (glows, highlights, blooms etc) and multiplicative (shadows, occlusions ....).