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-10-13 15:19:41 +00:00
|
|
|
vec4 _0_blend_luminosity;
|
2020-09-21 21:01:22 +00:00
|
|
|
{
|
2020-10-13 15:19:41 +00:00
|
|
|
float _1_alpha = dst.w * src.w;
|
|
|
|
vec3 _2_sda = src.xyz * dst.w;
|
|
|
|
vec3 _3_dsa = dst.xyz * src.w;
|
2020-11-18 20:38:39 +00:00
|
|
|
vec3 _4_blend_set_color_luminance;
|
2020-10-15 14:32:04 +00:00
|
|
|
{
|
2020-11-18 20:38:39 +00:00
|
|
|
float _5_15_blend_color_luminance;
|
2020-10-15 14:32:04 +00:00
|
|
|
{
|
2020-11-18 20:38:39 +00:00
|
|
|
_5_15_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_sda);
|
2020-10-15 14:32:04 +00:00
|
|
|
}
|
2020-11-18 20:38:39 +00:00
|
|
|
float _6_lum = _5_15_blend_color_luminance;
|
2020-10-15 14:32:04 +00:00
|
|
|
|
2020-11-18 20:38:39 +00:00
|
|
|
float _7_16_blend_color_luminance;
|
2020-10-15 14:32:04 +00:00
|
|
|
{
|
2020-11-18 20:38:39 +00:00
|
|
|
_7_16_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_dsa);
|
2020-10-15 14:32:04 +00:00
|
|
|
}
|
2020-11-18 20:38:39 +00:00
|
|
|
vec3 _8_result = (_6_lum - _7_16_blend_color_luminance) + _3_dsa;
|
2020-10-15 14:32:04 +00:00
|
|
|
|
|
|
|
float _9_minComp = min(min(_8_result.x, _8_result.y), _8_result.z);
|
|
|
|
float _10_maxComp = max(max(_8_result.x, _8_result.y), _8_result.z);
|
2020-11-18 20:38:39 +00:00
|
|
|
if (_9_minComp < 0.0 && _6_lum != _9_minComp) {
|
|
|
|
_8_result = _6_lum + ((_8_result - _6_lum) * _6_lum) / (_6_lum - _9_minComp);
|
2020-10-15 14:32:04 +00:00
|
|
|
}
|
2020-11-18 20:38:39 +00:00
|
|
|
_4_blend_set_color_luminance = _10_maxComp > _1_alpha && _10_maxComp != _6_lum ? _6_lum + ((_8_result - _6_lum) * (_1_alpha - _6_lum)) / (_10_maxComp - _6_lum) : _8_result;
|
2020-10-15 14:32:04 +00:00
|
|
|
}
|
2020-11-18 20:38:39 +00:00
|
|
|
_0_blend_luminosity = vec4((((_4_blend_set_color_luminance + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
|
2020-10-15 14:32:04 +00:00
|
|
|
|
2020-09-21 21:01:22 +00:00
|
|
|
}
|
2020-10-13 15:19:41 +00:00
|
|
|
|
|
|
|
sk_FragColor = _0_blend_luminosity;
|
2020-09-21 21:01:22 +00:00
|
|
|
|
|
|
|
}
|