fix color bleeding

This commit is contained in:
2019-07-21 00:27:34 +02:00
parent 02fda636ab
commit 85d9c057f8
15 changed files with 258 additions and 221 deletions

View File

@@ -61,8 +61,8 @@ void main()
highp vec4 fg = vec4(col.rgb, brush_alpha);
// early discard
if (fg.a == 0.0)
discard;
// if (fg.a == 0.0)
// discard;
if (use_pattern)
{
@@ -86,11 +86,14 @@ void main()
highp vec4 bg = texture(tex_bg, uv2);
#endif
if (bg.a == 0.0)
bg.rgb = col.rgb;
fg.a *= 1.0-rand(uv2+uv)*noise;
// no need to go further
if (fg.a <= 0.0)
discard;
// if (fg.a <= 0.0)
// discard;
if (mix_alpha > 0.0)
{