improve stroke hard mix shader

This commit is contained in:
2019-08-06 09:27:14 +02:00
parent 678114fca1
commit 52726257f9

View File

@@ -13,7 +13,9 @@ mediump float blend_stroke_hard_light(highp float base, highp float stroke)
highp float blend_stroke_hard_mix(highp float base, highp float stroke) highp float blend_stroke_hard_mix(highp float base, highp float stroke)
{ {
return base + stroke < 0.5 ? 0.0 : base + stroke; if (base == 0.0)
return 0.0;
return base + stroke < 0.5 ? 0.0 : clamp(base + stroke, 0.0, 1.0);
} }
highp float blend_stroke_color_dodge(highp float base, highp float stroke) highp float blend_stroke_color_dodge(highp float base, highp float stroke)