I am looking for the algorithm that is used to compute output pixel value when drawing source pixel on top of destination pixel. When the source pixel doesn’t have an alpha, then obviously I can set the output pixel to be equal to source pixel. What about when the source has alpha? How do I compute the new alpha and RGB values?
Share
The output is just a weighted sum of the destination and the source.
Do this for each of the three RGB channels.