parse abr from PS 2018, restore xmp injection, check uniform hash collision

This commit is contained in:
2019-02-25 23:23:14 +01:00
parent 87044e06c4
commit d3768f43c9
11 changed files with 93 additions and 28 deletions

View File

@@ -51,7 +51,8 @@ void main()
{
mediump vec4 base = texture(tex, uv);
mediump vec4 stroke = texture(tex_stroke, uv);
if (stroke.a == 0)
if (stroke.a == 0.0)
{
frag = base;
return;
@@ -68,13 +69,13 @@ void main()
patt = brightness1(patt, 1.0 - pattern_bright);
if (pattern_contr != 0.5)
patt = contrast1(patt, pattern_contr);
stroke.a = blend_stroke(stroke.a, patt, pattern_depth, patt_blend_mode);
stroke.a = clamp(blend_stroke(stroke.a, patt, pattern_depth, patt_blend_mode), 0.0, 1.0);
}
if (use_dual)
{
mediump vec4 dual = texture(tex_dual, uv);
stroke.a = blend_stroke(stroke.a, dual.a, dual_alpha, dual_blend_mode);
stroke.a = clamp(blend_stroke(stroke.a, dual.a, dual_alpha, dual_blend_mode), 0.0, 1.0);
}
stroke.a = mask ? stroke.a * blur(tex_mask, uv).r : stroke.a;