add color burn, fragment early discard
This commit is contained in:
@@ -59,6 +59,10 @@ void main()
|
||||
mediump float brush_alpha = ( 1.0 - texture(tex, uv/q).r ) * alpha;
|
||||
mediump vec4 fg = vec4(col.rgb, brush_alpha);
|
||||
|
||||
// early discard
|
||||
if (fg.a == 0.0)
|
||||
discard;
|
||||
|
||||
if (use_pattern)
|
||||
{
|
||||
mediump vec2 rscale = resolution / vec2(512.0);
|
||||
@@ -84,7 +88,7 @@ void main()
|
||||
fg.a *= 1.0-rand(uv2+uv)*noise;
|
||||
|
||||
// no need to go further
|
||||
if (fg.a == 0.0)
|
||||
if (fg.a <= 0.0)
|
||||
discard;
|
||||
|
||||
if (mix_alpha > 0.0)
|
||||
|
||||
Reference in New Issue
Block a user