brush scale for non-square brushes

This commit is contained in:
2019-02-24 21:00:53 +01:00
parent 399bc3d433
commit bfaff312f8
9 changed files with 52 additions and 22 deletions

View File

@@ -64,13 +64,10 @@ void main()
mediump float patt = texture(tex_pattern, uv * (1.0 / pattern_scale) * rscale + pattern_offset).r;
if (pattern_invert)
patt = 1.0 - patt;
//patt = patt * pattern_alpha + (1.0 - pattern_alpha);
if (pattern_bright != 0.5)
patt = brightness1(patt, 1.0 - pattern_bright);
if (pattern_contr != 0.5)
patt = contrast1(patt, pattern_contr);
//mediump float pa = (1.0 - patt) * pow(pattern_depth, 0.25) + (stroke.a * pattern_depth * 10.0);
//mediump float pa = pow((1.0 - patt), max(1.0, (1.0 - pattern_depth) * 10.0)) * pow(pattern_depth, 0.25) + (stroke.a * pattern_depth * 5.0);
stroke.a = blend_stroke(stroke.a, patt, pattern_depth, patt_blend_mode);
}