The calculation of the mix color was not using the bottom color when the alpha was lower than 1.0. Also added clamp code to avoid values outside valid ranges.
The calculation of the mix color was not using the bottom color when the alpha was lower than 1.0. Also added clamp code to avoid values outside valid ranges.