fix color bleeding
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user