In Porter Duff, we get the following equation:
C = A_src [s] + A_dst [d] + A_both * [b]
This works for colours, but how should alpha be handled in this situation? When I apply this equation to the alpha for the Over operator, my final product becomes much darker because the alpha is less than 1. If I force my implementation to always output 255 for alpha, everything works nicely.
Is this something wrong with my implementation? Am I misunderstanding something? Is there another equation I should be using specifically for alpha?
In Porter Duff, we get the following equation: C = A_src [s] + A_dst [d] + A_both * [b] This works for colours, but how should alpha be handled in this situation? When I apply this equation to the alpha for the Over operator, my final product becomes much darker because the alpha is less than 1. If I force my implementation to always output 255 for alpha, everything works nicely.
Is this something wrong with my implementation? Am I misunderstanding something? Is there another equation I should be using specifically for alpha?