Updated: April 19, 2023 |
Types of available alpha modes
#include <screen/screen.h>
enum { SCREEN_NON_PRE_MULTIPLIED_ALPHA = 0, SCREEN_PRE_MULTIPLIED_ALPHA = 1 };
This is the default. In this case, the source blending is done using the equation:
c(r,g,b) = s(r,g,b) * s(a) + d(r,g,b) * (1 - s(a))
In this case, the source blending is done using the equation:
c(r,g,b) = s(r,g,b) + d(r,g,b) * (1 - s(a))