2020-09-21 21:01:22 +00:00
|
|
|
#version 400
|
2020-09-25 17:35:58 +00:00
|
|
|
out vec4 sk_FragColor;
|
2021-03-15 18:58:57 +00:00
|
|
|
uniform vec4 src;
|
|
|
|
uniform vec4 dst;
|
2022-01-25 14:42:12 +00:00
|
|
|
float blend_overlay_component_Qhh2h2(vec2 s, vec2 d) {
|
2020-11-23 19:48:06 +00:00
|
|
|
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() {
|
2022-01-25 14:42:12 +00:00
|
|
|
vec4 _0_result = vec4(blend_overlay_component_Qhh2h2(dst.xw, src.xw), blend_overlay_component_Qhh2h2(dst.yw, src.yw), blend_overlay_component_Qhh2h2(dst.zw, src.zw), dst.w + (1.0 - dst.w) * src.w);
|
2021-06-16 19:31:45 +00:00
|
|
|
_0_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
|
|
|
|
sk_FragColor = _0_result;
|
2020-09-21 21:01:22 +00:00
|
|
|
}
|