2020-09-21 21:01:22 +00:00
|
|
|
#version 400
|
2020-09-25 17:35:58 +00:00
|
|
|
out vec4 sk_FragColor;
|
2021-01-15 20:54:02 +00:00
|
|
|
in vec4 src;
|
|
|
|
in vec4 dst;
|
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-09-28 17:13:40 +00:00
|
|
|
void main() {
|
2020-12-16 18:25:14 +00:00
|
|
|
vec4 _1_result = vec4(_blend_overlay_component(src.xw, dst.xw), _blend_overlay_component(src.yw, dst.yw), _blend_overlay_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
2020-12-15 20:21:03 +00:00
|
|
|
_1_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
|
2020-12-17 19:38:56 +00:00
|
|
|
sk_FragColor = _1_result;
|
2020-09-28 17:13:40 +00:00
|
|
|
|
2020-09-21 21:01:22 +00:00
|
|
|
}
|