2020-09-21 21:01:22 +00:00
|
|
|
|
2020-09-25 17:35:58 +00:00
|
|
|
out vec4 sk_FragColor;
|
2020-11-23 19:48:06 +00:00
|
|
|
float _blend_overlay_component(vec2 s, vec2 d) {
|
|
|
|
return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
|
|
|
|
}
|
2020-10-06 18:43:32 +00:00
|
|
|
in vec4 src;
|
|
|
|
in vec4 dst;
|
2020-09-28 17:13:40 +00:00
|
|
|
void main() {
|
2020-12-16 18:25:14 +00:00
|
|
|
vec4 _2_result = vec4(_blend_overlay_component(dst.xw, src.xw), _blend_overlay_component(dst.yw, src.yw), _blend_overlay_component(dst.zw, src.zw), dst.w + (1.0 - dst.w) * src.w);
|
2020-12-15 20:21:03 +00:00
|
|
|
_2_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
|
2020-12-17 19:38:56 +00:00
|
|
|
sk_FragColor = _2_result;
|
2020-12-15 20:21:03 +00:00
|
|
|
|
2020-12-16 18:24:48 +00:00
|
|
|
|
2020-09-21 21:01:22 +00:00
|
|
|
}
|