i want to alpha blend 2 pixels together by an alpha value between range 0-255 and i found this formula so far:
dest = alpha * (source - dest) / 255 + dest
the above formula works fine except on lower alpha value generates black artifact instead of transparency.(e.g:instead of transparency over back image generates black color).
so i'm wondering is there any other fast and optimized and of course with no artifacts formula for this?
dest = alpha * (source - dest) / 255 + dest
the above formula works fine except on lower alpha value generates black artifact instead of transparency.(e.g:instead of transparency over back image generates black color).
so i'm wondering is there any other fast and optimized and of course with no artifacts formula for this?