2020-09-21 21:01:22 +00:00
|
|
|
#version 400
|
2020-09-25 17:35:58 +00:00
|
|
|
out vec4 sk_FragColor;
|
2020-10-06 18:43:32 +00:00
|
|
|
in vec4 src;
|
|
|
|
in vec4 dst;
|
2020-09-25 17:35:58 +00:00
|
|
|
void main() {
|
2020-12-16 18:25:14 +00:00
|
|
|
float _1_alpha = dst.w * src.w;
|
|
|
|
vec3 _2_sda = src.xyz * dst.w;
|
|
|
|
vec3 _3_dsa = dst.xyz * src.w;
|
2020-12-17 19:38:56 +00:00
|
|
|
float _5_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_sda);
|
2020-12-15 20:21:03 +00:00
|
|
|
|
2020-12-17 19:38:56 +00:00
|
|
|
vec3 _6_result = (_5_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_dsa)) + _3_dsa;
|
2020-12-16 18:24:48 +00:00
|
|
|
|
2020-12-17 19:38:56 +00:00
|
|
|
float _7_minComp = min(min(_6_result.x, _6_result.y), _6_result.z);
|
|
|
|
float _8_maxComp = max(max(_6_result.x, _6_result.y), _6_result.z);
|
|
|
|
if (_7_minComp < 0.0 && _5_lum != _7_minComp) {
|
|
|
|
_6_result = _5_lum + ((_6_result - _5_lum) * _5_lum) / (_5_lum - _7_minComp);
|
2020-09-21 21:01:22 +00:00
|
|
|
}
|
2020-12-17 19:38:56 +00:00
|
|
|
sk_FragColor = vec4(((((_8_maxComp > _1_alpha && _8_maxComp != _5_lum ? _5_lum + ((_6_result - _5_lum) * (_1_alpha - _5_lum)) / (_8_maxComp - _5_lum) : _6_result) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
|
2020-12-15 20:21:03 +00:00
|
|
|
|
2020-09-21 21:01:22 +00:00
|
|
|
|
|
|
|
}
|