Change equation of alpha blending
Opened this issue · 0 comments
bvssvni commented
Currently, the equation for alpha blending is (taken from Gfx):
new_dest_alpha = src_alpha + dest_alpha
Glium uses new_dest_alpha = src_alpha * src_alpha + dest_alpha * (1 - src_alpha)
.
According to https://en.wikipedia.org/wiki/Alpha_compositing, both equations are incorrect. The correct equation for alpha is:
new_dest_alpha = src_alpha + dest_alpha * (1 - src_alpha)