Fix T65187: Overlay blend increase wrongly the opacity
authorAntonioya <blendergit@gmail.com>
Tue, 28 May 2019 13:55:17 +0000 (15:55 +0200)
committerAntonioya <blendergit@gmail.com>
Tue, 28 May 2019 13:55:31 +0000 (15:55 +0200)
commitf139caa6322fc71a16f9c22f4202d6dde42573a7
tree7c58661e76dc51676cb5d1b75612ae5e1465b558
parent5778e616e5adc58a5669f3f24ad2358e947dd8d8
Fix T65187: Overlay blend increase wrongly the opacity

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.
source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl