Fix blending of layer styles with transparent pixels
Overlay-like layer styles (overlay, inner shadow, inner glow and satin)
seem to be applied in a complicated way:
- Firstly the copy of the layer-stack projection is created
- Then a copy of original layer alpha channel is extracted into a selection
- Alpha channel of the layer itself is maxed-out to 1.0
- The layer and all the layer overlay-like styles are merged into the projection
- The the copy of the original projection from step 1) is copied onto the projection again using selection from step 2).
This weird technique is used to ensure that color mixing happens
exactly in full opacity, as if the colors would have no alpha-channel.