1
2out vec4 sk_FragColor;
3uniform vec4 src;
4uniform vec4 dst;
5float _color_dodge_component_hh2h2(vec2 s, vec2 d) {
6    if (d.x == 0.0) {
7        return s.x * (1.0 - d.y);
8    } else {
9        float delta = s.y - s.x;
10        if (delta == 0.0) {
11            return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
12        } else {
13            delta = min(d.y, (d.x * s.y) / delta);
14            return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
15        }
16    }
17}
18void main() {
19    sk_FragColor = vec4(_color_dodge_component_hh2h2(src.xw, dst.xw), _color_dodge_component_hh2h2(src.yw, dst.yw), _color_dodge_component_hh2h2(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
20}
21