[英]Korge: What does the bitmap `premultiplied` variable do?
That property indicates how the Bitmap RGB (red, green, blue) components of each pixel are stored based on the alpha component.该属性指示如何根据 alpha 分量存储每个像素的位图 RGB(红、绿、蓝)分量。 This is typically named premultiplied alpha.
这通常称为预乘 alpha。
premultiplied=true
means that the RGB components are stored after being multiplied by the alpha component. premultiplied=true
表示 RGB 分量乘以 alpha 分量后存储。 For example:例如:
StoredRGBA=R*A,G*A,B*A,A
while premultiplied=false
:而
premultiplied=false
:
StoredRGBA=R,G,B,A
So this refers to how the storage should be interpreted regarding to the real components of each pixel.因此,这是指应如何根据每个像素的实际分量来解释存储。
Premultiplied alpha allows to perform blending operations much faster and in OpenGL it is typically required when the render buffer also has alpha.预乘 alpha 允许更快地执行混合操作,并且在 OpenGL 中,当渲染缓冲区也具有 alpha 时通常需要它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.