Remove extraneous line-breaks in generated GLSL/Metal code.
I ran into an issue in an upcoming CL which generated a particularly ugly switch statement: switch (x) { default: discard;} So I cleaned this up, and while resolving this issue, managed to improve a bunch of existing codegen as well. The formatting change has been split out to a separate CL since it impacts so many golden outputs. Change-Id: I7a6be29903c47560dcc7f6acd3ef15fd0c5c3c50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384179 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
62d6373f8c
commit
e8b5a73b56
@ -44,7 +44,6 @@ public:
|
||||
R"SkSL(half4 color = %s;
|
||||
@if (%s) {
|
||||
color = half4(color.xyz / max(color.w, 9.9999997473787516e-05), color.w);
|
||||
|
||||
}
|
||||
color = %s * color + %s;
|
||||
@if (%s) {
|
||||
|
@ -39,8 +39,7 @@ void GLSLCodeGenerator::write(const char* s) {
|
||||
|
||||
void GLSLCodeGenerator::writeLine(const char* s) {
|
||||
this->write(s);
|
||||
fOut->writeText(fLineEnding);
|
||||
fAtLineStart = true;
|
||||
this->writeLine();
|
||||
}
|
||||
|
||||
void GLSLCodeGenerator::write(const String& s) {
|
||||
@ -65,7 +64,14 @@ void GLSLCodeGenerator::writeLine(const String& s) {
|
||||
}
|
||||
|
||||
void GLSLCodeGenerator::writeLine() {
|
||||
this->writeLine("");
|
||||
fOut->writeText(fLineEnding);
|
||||
fAtLineStart = true;
|
||||
}
|
||||
|
||||
void GLSLCodeGenerator::finishLine() {
|
||||
if (!fAtLineStart) {
|
||||
this->writeLine();
|
||||
}
|
||||
}
|
||||
|
||||
void GLSLCodeGenerator::writeExtension(const String& name) {
|
||||
@ -1032,7 +1038,7 @@ void GLSLCodeGenerator::writeFunction(const FunctionDefinition& f) {
|
||||
for (const std::unique_ptr<Statement>& stmt : f.body()->as<Block>().children()) {
|
||||
if (!stmt->isEmpty()) {
|
||||
this->writeStatement(*stmt);
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1249,7 +1255,7 @@ void GLSLCodeGenerator::writeBlock(const Block& b) {
|
||||
for (const std::unique_ptr<Statement>& stmt : b.children()) {
|
||||
if (!stmt->isEmpty()) {
|
||||
this->writeStatement(*stmt);
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
}
|
||||
}
|
||||
if (isScope) {
|
||||
@ -1352,7 +1358,7 @@ void GLSLCodeGenerator::writeDoStatement(const DoStatement& d) {
|
||||
this->write(tmpVar);
|
||||
this->writeLine(" = true;");
|
||||
this->writeStatement(*d.statement());
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
fIndentation--;
|
||||
this->write("}");
|
||||
}
|
||||
@ -1374,6 +1380,7 @@ void GLSLCodeGenerator::writeSwitchStatement(const SwitchStatement& s) {
|
||||
if (!c.statement()->isEmpty()) {
|
||||
fIndentation++;
|
||||
this->writeStatement(*c.statement());
|
||||
this->finishLine();
|
||||
fIndentation--;
|
||||
}
|
||||
}
|
||||
@ -1393,7 +1400,7 @@ void GLSLCodeGenerator::writeReturnStatement(const ReturnStatement& r) {
|
||||
void GLSLCodeGenerator::writeHeader() {
|
||||
if (this->caps().versionDeclString()) {
|
||||
this->write(this->caps().versionDeclString());
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1409,7 +1416,7 @@ void GLSLCodeGenerator::writeProgramElement(const ProgramElement& e) {
|
||||
if (builtin == -1) {
|
||||
// normal var
|
||||
this->writeVarDeclaration(decl, true);
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
} else if (builtin == SK_FRAGCOLOR_BUILTIN &&
|
||||
this->caps().mustDeclareFragmentShaderOutput()) {
|
||||
if (fProgram.fConfig->fSettings.fFragColorIsInOut) {
|
||||
|
@ -74,6 +74,8 @@ protected:
|
||||
|
||||
void writeLine(const String& s);
|
||||
|
||||
void finishLine();
|
||||
|
||||
virtual void writeHeader();
|
||||
|
||||
virtual bool usesPrecisionModifiers() const;
|
||||
|
@ -87,8 +87,7 @@ void MetalCodeGenerator::write(const char* s) {
|
||||
|
||||
void MetalCodeGenerator::writeLine(const char* s) {
|
||||
this->write(s);
|
||||
fOut->writeText(fLineEnding);
|
||||
fAtLineStart = true;
|
||||
this->writeLine();
|
||||
}
|
||||
|
||||
void MetalCodeGenerator::write(const String& s) {
|
||||
@ -100,7 +99,14 @@ void MetalCodeGenerator::writeLine(const String& s) {
|
||||
}
|
||||
|
||||
void MetalCodeGenerator::writeLine() {
|
||||
this->writeLine("");
|
||||
fOut->writeText(fLineEnding);
|
||||
fAtLineStart = true;
|
||||
}
|
||||
|
||||
void MetalCodeGenerator::finishLine() {
|
||||
if (!fAtLineStart) {
|
||||
this->writeLine();
|
||||
}
|
||||
}
|
||||
|
||||
void MetalCodeGenerator::writeExtension(const Extension& ext) {
|
||||
@ -1594,14 +1600,14 @@ void MetalCodeGenerator::writeFunction(const FunctionDefinition& f) {
|
||||
for (const std::unique_ptr<Statement>& stmt : f.body()->as<Block>().children()) {
|
||||
if (!stmt->isEmpty()) {
|
||||
this->writeStatement(*stmt);
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
}
|
||||
}
|
||||
if (f.declaration().name() == "main") {
|
||||
// If the main function doesn't end with a return, we need to synthesize one here.
|
||||
if (!is_block_ending_with_return(f.body().get())) {
|
||||
this->writeReturnStatementFromMain();
|
||||
this->writeLine("");
|
||||
this->finishLine();
|
||||
}
|
||||
}
|
||||
fIndentation--;
|
||||
@ -1789,7 +1795,7 @@ void MetalCodeGenerator::writeBlock(const Block& b) {
|
||||
for (const std::unique_ptr<Statement>& stmt : b.children()) {
|
||||
if (!stmt->isEmpty()) {
|
||||
this->writeStatement(*stmt);
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
}
|
||||
}
|
||||
if (isScope) {
|
||||
@ -1861,6 +1867,7 @@ void MetalCodeGenerator::writeSwitchStatement(const SwitchStatement& s) {
|
||||
if (!c.statement()->isEmpty()) {
|
||||
fIndentation++;
|
||||
this->writeStatement(*c.statement());
|
||||
this->finishLine();
|
||||
fIndentation--;
|
||||
}
|
||||
}
|
||||
@ -2174,7 +2181,7 @@ void MetalCodeGenerator::writeProgramElement(const ProgramElement& e) {
|
||||
if (-1 == builtin) {
|
||||
// normal var
|
||||
this->writeVarDeclaration(decl, true);
|
||||
this->writeLine();
|
||||
this->finishLine();
|
||||
} else if (SK_FRAGCOLOR_BUILTIN == builtin) {
|
||||
// ignore
|
||||
}
|
||||
|
@ -126,6 +126,8 @@ protected:
|
||||
|
||||
void writeLine(const String& s);
|
||||
|
||||
void finishLine();
|
||||
|
||||
void writeHeader();
|
||||
|
||||
void writeUniformStruct();
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4(0.0);
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = float4(0.0);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4(0.0);
|
||||
|
||||
}
|
||||
|
@ -8,25 +8,19 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_luminance;
|
||||
float _4_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
vec3 _5_result = (_4_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda)) + _1_sda;
|
||||
|
||||
float _6_minComp = min(min(_5_result.x, _5_result.y), _5_result.z);
|
||||
float _7_maxComp = max(max(_5_result.x, _5_result.y), _5_result.z);
|
||||
if (_6_minComp < 0.0 && _4_lum != _6_minComp) {
|
||||
float _8_d = _4_lum - _6_minComp;
|
||||
_5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / _8_d);
|
||||
|
||||
}
|
||||
if (_7_maxComp > _0_alpha && _7_maxComp != _4_lum) {
|
||||
vec3 _9_n = (_5_result - _4_lum) * (_0_alpha - _4_lum);
|
||||
float _10_d = _7_maxComp - _4_lum;
|
||||
_3_blend_set_color_luminance = _4_lum + _9_n / _10_d;
|
||||
|
||||
} else {
|
||||
_3_blend_set_color_luminance = _5_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_3_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
@ -18,26 +17,20 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
float3 _2_dsa = _in.dst.xyz * _in.src.w;
|
||||
float3 _3_blend_set_color_luminance;
|
||||
float _4_lum = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
float3 _5_result = (_4_lum - dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda)) + _1_sda;
|
||||
|
||||
float _6_minComp = min(min(_5_result.x, _5_result.y), _5_result.z);
|
||||
float _7_maxComp = max(max(_5_result.x, _5_result.y), _5_result.z);
|
||||
if (_6_minComp < 0.0 && _4_lum != _6_minComp) {
|
||||
float _8_d = _4_lum - _6_minComp;
|
||||
_5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / _8_d);
|
||||
|
||||
}
|
||||
if (_7_maxComp > _0_alpha && _7_maxComp != _4_lum) {
|
||||
float3 _9_n = (_5_result - _4_lum) * (_0_alpha - _4_lum);
|
||||
float _10_d = _7_maxComp - _4_lum;
|
||||
_3_blend_set_color_luminance = _4_lum + _9_n / _10_d;
|
||||
|
||||
} else {
|
||||
_3_blend_set_color_luminance = _5_result;
|
||||
}
|
||||
_out.sk_FragColor = float4((((_3_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
|
||||
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -10,11 +10,9 @@ float _color_burn_component(vec2 s, vec2 d) {
|
||||
} else {
|
||||
float _1_n = (d.y - d.x) * s.y;
|
||||
float delta = max(0.0, d.y - _1_n / s.x);
|
||||
|
||||
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
|
||||
}
|
||||
}
|
||||
void main() {
|
||||
sk_FragColor = vec4(_color_burn_component(src.xw, dst.xw), _color_burn_component(src.yw, dst.yw), _color_burn_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -16,16 +16,13 @@ float _color_burn_component(float2 s, float2 d) {
|
||||
} else {
|
||||
float _1_n = (d.y - d.x) * s.y;
|
||||
float delta = max(0.0, d.y - _1_n / s.x);
|
||||
|
||||
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = float4(_color_burn_component(_in.src.xw, _in.dst.xw), _color_burn_component(_in.src.yw, _in.dst.yw), _color_burn_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -10,11 +10,9 @@ float _color_burn_component(vec2 s, vec2 d) {
|
||||
} else {
|
||||
float _1_n = (d.y - d.x) * s.y;
|
||||
float delta = max(0.0, d.y - _1_n / s.x);
|
||||
|
||||
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
|
||||
}
|
||||
}
|
||||
void main() {
|
||||
sk_FragColor = vec4(_color_burn_component(src.xw, dst.xw), _color_burn_component(src.yw, dst.yw), _color_burn_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -12,12 +12,10 @@ float _color_dodge_component(vec2 s, vec2 d) {
|
||||
} else {
|
||||
float _0_n = d.x * s.y;
|
||||
delta = min(d.y, _0_n / delta);
|
||||
|
||||
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
void main() {
|
||||
sk_FragColor = vec4(_color_dodge_component(src.xw, dst.xw), _color_dodge_component(src.yw, dst.yw), _color_dodge_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -18,17 +18,14 @@ float _color_dodge_component(float2 s, float2 d) {
|
||||
} else {
|
||||
float _0_n = d.x * s.y;
|
||||
delta = min(d.y, _0_n / delta);
|
||||
|
||||
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = float4(_color_dodge_component(_in.src.xw, _in.dst.xw), _color_dodge_component(_in.src.yw, _in.dst.yw), _color_dodge_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -12,12 +12,10 @@ float _color_dodge_component(vec2 s, vec2 d) {
|
||||
} else {
|
||||
float _0_n = d.x * s.y;
|
||||
delta = min(d.y, _0_n / delta);
|
||||
|
||||
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
void main() {
|
||||
sk_FragColor = vec4(_color_dodge_component(src.xw, dst.xw), _color_dodge_component(src.yw, dst.yw), _color_dodge_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -8,25 +8,19 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_luminance;
|
||||
float _4_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
vec3 _5_result = (_4_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda)) + _1_sda;
|
||||
|
||||
float _6_minComp = min(min(_5_result.x, _5_result.y), _5_result.z);
|
||||
float _7_maxComp = max(max(_5_result.x, _5_result.y), _5_result.z);
|
||||
if (_6_minComp < 0.0 && _4_lum != _6_minComp) {
|
||||
float _8_d = _4_lum - _6_minComp;
|
||||
_5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / _8_d);
|
||||
|
||||
}
|
||||
if (_7_maxComp > _0_alpha && _7_maxComp != _4_lum) {
|
||||
vec3 _9_n = (_5_result - _4_lum) * (_0_alpha - _4_lum);
|
||||
float _10_d = _7_maxComp - _4_lum;
|
||||
_3_blend_set_color_luminance = _4_lum + _9_n / _10_d;
|
||||
|
||||
} else {
|
||||
_3_blend_set_color_luminance = _5_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_3_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,8 +4,6 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
vec4 _0_result = src + (1.0 - src.w) * dst;
|
||||
|
||||
_0_result.xyz = min(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
}
|
||||
|
@ -9,14 +9,11 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
float4 _0_result = _in.src + (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
_0_result.xyz = min(_0_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
|
||||
_out.sk_FragColor = _0_result;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,8 +4,6 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
vec4 _0_result = src + (1.0 - src.w) * dst;
|
||||
|
||||
_0_result.xyz = min(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = float4((_in.src.xyz + _in.dst.xyz) - 2.0 * min(_in.src.xyz * _in.dst.w, _in.dst.xyz * _in.src.w), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.dst.w * _in.src + (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst * src.w;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.dst * _in.src.w;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst * src.w;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - dst.w) * src + dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = (1.0 - _in.dst.w) * _in.src + _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - dst.w) * src + dst;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst;
|
||||
|
||||
}
|
||||
|
@ -10,10 +10,7 @@ void main() {
|
||||
_0_blend = src * dst;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
sk_FragColor = _0_blend;
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
@ -20,11 +19,8 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
_0_blend = _in.src * _in.dst;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
_out.sk_FragColor = _0_blend;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -10,10 +10,7 @@ void main() {
|
||||
_0_blend = src * dst;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
sk_FragColor = _0_blend;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = float4((_in.dst.xyz + _in.src.xyz) - (2.0 * _in.dst.xyz) * _in.src.xyz, _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,4 @@ void main() {
|
||||
vec4 _0_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);
|
||||
_0_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
|
||||
}
|
||||
|
@ -12,14 +12,11 @@ float _blend_overlay_component(float2 s, float2 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);
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
float4 _0_result = float4(_blend_overlay_component(_in.dst.xw, _in.src.xw), _blend_overlay_component(_in.dst.yw, _in.src.yw), _blend_overlay_component(_in.dst.zw, _in.src.zw), _in.dst.w + (1.0 - _in.dst.w) * _in.src.w);
|
||||
_0_result.xyz = _0_result.xyz + _in.src.xyz * (1.0 - _in.dst.w) + _in.dst.xyz * (1.0 - _in.src.w);
|
||||
_out.sk_FragColor = _0_result;
|
||||
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -9,6 +9,4 @@ void main() {
|
||||
vec4 _0_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);
|
||||
_0_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
|
||||
float _7_n = sat * (minMidMax.y - minMidMax.x);
|
||||
float _8_d = minMidMax.z - minMidMax.x;
|
||||
return vec3(0.0, _7_n / _8_d, sat);
|
||||
|
||||
} else {
|
||||
return vec3(0.0);
|
||||
}
|
||||
@ -18,7 +17,6 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_saturation;
|
||||
float _4_sat = max(max(_2_dsa.x, _2_dsa.y), _2_dsa.z) - min(min(_2_dsa.x, _2_dsa.y), _2_dsa.z);
|
||||
|
||||
if (_1_sda.x <= _1_sda.y) {
|
||||
if (_1_sda.y <= _1_sda.z) {
|
||||
_3_blend_set_color_saturation = _blend_set_color_saturation_helper(_1_sda, _4_sat);
|
||||
@ -36,26 +34,19 @@ void main() {
|
||||
}
|
||||
vec3 _5_blend_set_color_luminance;
|
||||
float _6_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
vec3 _7_result = (_6_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_blend_set_color_saturation)) + _3_blend_set_color_saturation;
|
||||
|
||||
float _8_minComp = min(min(_7_result.x, _7_result.y), _7_result.z);
|
||||
float _9_maxComp = max(max(_7_result.x, _7_result.y), _7_result.z);
|
||||
if (_8_minComp < 0.0 && _6_lum != _8_minComp) {
|
||||
float _10_d = _6_lum - _8_minComp;
|
||||
_7_result = _6_lum + (_7_result - _6_lum) * (_6_lum / _10_d);
|
||||
|
||||
}
|
||||
if (_9_maxComp > _0_alpha && _9_maxComp != _6_lum) {
|
||||
vec3 _11_n = (_7_result - _6_lum) * (_0_alpha - _6_lum);
|
||||
float _12_d = _9_maxComp - _6_lum;
|
||||
_5_blend_set_color_luminance = _6_lum + _11_n / _12_d;
|
||||
|
||||
} else {
|
||||
_5_blend_set_color_luminance = _7_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_5_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -13,13 +13,11 @@ float3 _blend_set_color_saturation_helper(float3 minMidMax, float sat) {
|
||||
float _7_n = sat * (minMidMax.y - minMidMax.x);
|
||||
float _8_d = minMidMax.z - minMidMax.x;
|
||||
return float3(0.0, _7_n / _8_d, sat);
|
||||
|
||||
} else {
|
||||
return float3(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
@ -28,7 +26,6 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
float3 _2_dsa = _in.dst.xyz * _in.src.w;
|
||||
float3 _3_blend_set_color_saturation;
|
||||
float _4_sat = max(max(_2_dsa.x, _2_dsa.y), _2_dsa.z) - min(min(_2_dsa.x, _2_dsa.y), _2_dsa.z);
|
||||
|
||||
if (_1_sda.x <= _1_sda.y) {
|
||||
if (_1_sda.y <= _1_sda.z) {
|
||||
_3_blend_set_color_saturation = _blend_set_color_saturation_helper(_1_sda, _4_sat);
|
||||
@ -46,27 +43,20 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
}
|
||||
float3 _5_blend_set_color_luminance;
|
||||
float _6_lum = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
float3 _7_result = (_6_lum - dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_blend_set_color_saturation)) + _3_blend_set_color_saturation;
|
||||
|
||||
float _8_minComp = min(min(_7_result.x, _7_result.y), _7_result.z);
|
||||
float _9_maxComp = max(max(_7_result.x, _7_result.y), _7_result.z);
|
||||
if (_8_minComp < 0.0 && _6_lum != _8_minComp) {
|
||||
float _10_d = _6_lum - _8_minComp;
|
||||
_7_result = _6_lum + (_7_result - _6_lum) * (_6_lum / _10_d);
|
||||
|
||||
}
|
||||
if (_9_maxComp > _0_alpha && _9_maxComp != _6_lum) {
|
||||
float3 _11_n = (_7_result - _6_lum) * (_0_alpha - _6_lum);
|
||||
float _12_d = _9_maxComp - _6_lum;
|
||||
_5_blend_set_color_luminance = _6_lum + _11_n / _12_d;
|
||||
|
||||
} else {
|
||||
_5_blend_set_color_luminance = _7_result;
|
||||
}
|
||||
_out.sk_FragColor = float4((((_5_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
|
||||
|
||||
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
|
||||
float _7_n = sat * (minMidMax.y - minMidMax.x);
|
||||
float _8_d = minMidMax.z - minMidMax.x;
|
||||
return vec3(0.0, _7_n / _8_d, sat);
|
||||
|
||||
} else {
|
||||
return vec3(0.0);
|
||||
}
|
||||
@ -18,7 +17,6 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_saturation;
|
||||
float _4_sat = max(max(_2_dsa.x, _2_dsa.y), _2_dsa.z) - min(min(_2_dsa.x, _2_dsa.y), _2_dsa.z);
|
||||
|
||||
if (_1_sda.x <= _1_sda.y) {
|
||||
if (_1_sda.y <= _1_sda.z) {
|
||||
_3_blend_set_color_saturation = _blend_set_color_saturation_helper(_1_sda, _4_sat);
|
||||
@ -36,26 +34,19 @@ void main() {
|
||||
}
|
||||
vec3 _5_blend_set_color_luminance;
|
||||
float _6_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
vec3 _7_result = (_6_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_blend_set_color_saturation)) + _3_blend_set_color_saturation;
|
||||
|
||||
float _8_minComp = min(min(_7_result.x, _7_result.y), _7_result.z);
|
||||
float _9_maxComp = max(max(_7_result.x, _7_result.y), _7_result.z);
|
||||
if (_8_minComp < 0.0 && _6_lum != _8_minComp) {
|
||||
float _10_d = _6_lum - _8_minComp;
|
||||
_7_result = _6_lum + (_7_result - _6_lum) * (_6_lum / _10_d);
|
||||
|
||||
}
|
||||
if (_9_maxComp > _0_alpha && _9_maxComp != _6_lum) {
|
||||
vec3 _11_n = (_7_result - _6_lum) * (_0_alpha - _6_lum);
|
||||
float _12_d = _9_maxComp - _6_lum;
|
||||
_5_blend_set_color_luminance = _6_lum + _11_n / _12_d;
|
||||
|
||||
} else {
|
||||
_5_blend_set_color_luminance = _7_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_5_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,8 +4,6 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
vec4 _0_result = src + (1.0 - src.w) * dst;
|
||||
|
||||
_0_result.xyz = max(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
}
|
||||
|
@ -9,14 +9,11 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
float4 _0_result = _in.src + (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
_0_result.xyz = max(_0_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
|
||||
_out.sk_FragColor = _0_result;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,8 +4,6 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
vec4 _0_result = src + (1.0 - src.w) * dst;
|
||||
|
||||
_0_result.xyz = max(_0_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
}
|
||||
|
@ -8,25 +8,19 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_luminance;
|
||||
float _4_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda);
|
||||
|
||||
vec3 _5_result = (_4_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa)) + _2_dsa;
|
||||
|
||||
float _6_minComp = min(min(_5_result.x, _5_result.y), _5_result.z);
|
||||
float _7_maxComp = max(max(_5_result.x, _5_result.y), _5_result.z);
|
||||
if (_6_minComp < 0.0 && _4_lum != _6_minComp) {
|
||||
float _8_d = _4_lum - _6_minComp;
|
||||
_5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / _8_d);
|
||||
|
||||
}
|
||||
if (_7_maxComp > _0_alpha && _7_maxComp != _4_lum) {
|
||||
vec3 _9_n = (_5_result - _4_lum) * (_0_alpha - _4_lum);
|
||||
float _10_d = _7_maxComp - _4_lum;
|
||||
_3_blend_set_color_luminance = _4_lum + _9_n / _10_d;
|
||||
|
||||
} else {
|
||||
_3_blend_set_color_luminance = _5_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_3_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
@ -18,26 +17,20 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
float3 _2_dsa = _in.dst.xyz * _in.src.w;
|
||||
float3 _3_blend_set_color_luminance;
|
||||
float _4_lum = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda);
|
||||
|
||||
float3 _5_result = (_4_lum - dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa)) + _2_dsa;
|
||||
|
||||
float _6_minComp = min(min(_5_result.x, _5_result.y), _5_result.z);
|
||||
float _7_maxComp = max(max(_5_result.x, _5_result.y), _5_result.z);
|
||||
if (_6_minComp < 0.0 && _4_lum != _6_minComp) {
|
||||
float _8_d = _4_lum - _6_minComp;
|
||||
_5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / _8_d);
|
||||
|
||||
}
|
||||
if (_7_maxComp > _0_alpha && _7_maxComp != _4_lum) {
|
||||
float3 _9_n = (_5_result - _4_lum) * (_0_alpha - _4_lum);
|
||||
float _10_d = _7_maxComp - _4_lum;
|
||||
_3_blend_set_color_luminance = _4_lum + _9_n / _10_d;
|
||||
|
||||
} else {
|
||||
_3_blend_set_color_luminance = _5_result;
|
||||
}
|
||||
_out.sk_FragColor = float4((((_3_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
|
||||
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -8,25 +8,19 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_luminance;
|
||||
float _4_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _1_sda);
|
||||
|
||||
vec3 _5_result = (_4_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa)) + _2_dsa;
|
||||
|
||||
float _6_minComp = min(min(_5_result.x, _5_result.y), _5_result.z);
|
||||
float _7_maxComp = max(max(_5_result.x, _5_result.y), _5_result.z);
|
||||
if (_6_minComp < 0.0 && _4_lum != _6_minComp) {
|
||||
float _8_d = _4_lum - _6_minComp;
|
||||
_5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / _8_d);
|
||||
|
||||
}
|
||||
if (_7_maxComp > _0_alpha && _7_maxComp != _4_lum) {
|
||||
vec3 _9_n = (_5_result - _4_lum) * (_0_alpha - _4_lum);
|
||||
float _10_d = _7_maxComp - _4_lum;
|
||||
_3_blend_set_color_luminance = _4_lum + _9_n / _10_d;
|
||||
|
||||
} else {
|
||||
_3_blend_set_color_luminance = _5_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_3_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.src * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src * dst;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = float4(((1.0 - _in.src.w) * _in.dst.xyz + (1.0 - _in.dst.w) * _in.src.xyz) + _in.src.xyz * _in.dst.xyz, _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = vec4(((1.0 - src.w) * dst.xyz + (1.0 - dst.w) * src.xyz) + src.xyz * dst.xyz, src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -9,5 +9,4 @@ void main() {
|
||||
vec4 _0_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);
|
||||
_0_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
}
|
||||
|
@ -12,13 +12,11 @@ float _blend_overlay_component(float2 s, float2 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);
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
float4 _0_result = float4(_blend_overlay_component(_in.src.xw, _in.dst.xw), _blend_overlay_component(_in.src.yw, _in.dst.yw), _blend_overlay_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
_0_result.xyz = _0_result.xyz + _in.dst.xyz * (1.0 - _in.src.w) + _in.src.xyz * (1.0 - _in.dst.w);
|
||||
_out.sk_FragColor = _0_result;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -9,5 +9,4 @@ void main() {
|
||||
vec4 _0_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);
|
||||
_0_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
|
||||
sk_FragColor = _0_result;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = min(src + dst, 1.0);
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = min(_in.src + _in.dst, 1.0);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = min(src + dst, 1.0);
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
|
||||
float _7_n = sat * (minMidMax.y - minMidMax.x);
|
||||
float _8_d = minMidMax.z - minMidMax.x;
|
||||
return vec3(0.0, _7_n / _8_d, sat);
|
||||
|
||||
} else {
|
||||
return vec3(0.0);
|
||||
}
|
||||
@ -18,7 +17,6 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_saturation;
|
||||
float _4_sat = max(max(_1_sda.x, _1_sda.y), _1_sda.z) - min(min(_1_sda.x, _1_sda.y), _1_sda.z);
|
||||
|
||||
if (_2_dsa.x <= _2_dsa.y) {
|
||||
if (_2_dsa.y <= _2_dsa.z) {
|
||||
_3_blend_set_color_saturation = _blend_set_color_saturation_helper(_2_dsa, _4_sat);
|
||||
@ -36,26 +34,19 @@ void main() {
|
||||
}
|
||||
vec3 _5_blend_set_color_luminance;
|
||||
float _6_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
vec3 _7_result = (_6_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_blend_set_color_saturation)) + _3_blend_set_color_saturation;
|
||||
|
||||
float _8_minComp = min(min(_7_result.x, _7_result.y), _7_result.z);
|
||||
float _9_maxComp = max(max(_7_result.x, _7_result.y), _7_result.z);
|
||||
if (_8_minComp < 0.0 && _6_lum != _8_minComp) {
|
||||
float _10_d = _6_lum - _8_minComp;
|
||||
_7_result = _6_lum + (_7_result - _6_lum) * (_6_lum / _10_d);
|
||||
|
||||
}
|
||||
if (_9_maxComp > _0_alpha && _9_maxComp != _6_lum) {
|
||||
vec3 _11_n = (_7_result - _6_lum) * (_0_alpha - _6_lum);
|
||||
float _12_d = _9_maxComp - _6_lum;
|
||||
_5_blend_set_color_luminance = _6_lum + _11_n / _12_d;
|
||||
|
||||
} else {
|
||||
_5_blend_set_color_luminance = _7_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_5_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -13,13 +13,11 @@ float3 _blend_set_color_saturation_helper(float3 minMidMax, float sat) {
|
||||
float _7_n = sat * (minMidMax.y - minMidMax.x);
|
||||
float _8_d = minMidMax.z - minMidMax.x;
|
||||
return float3(0.0, _7_n / _8_d, sat);
|
||||
|
||||
} else {
|
||||
return float3(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
@ -28,7 +26,6 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
float3 _2_dsa = _in.dst.xyz * _in.src.w;
|
||||
float3 _3_blend_set_color_saturation;
|
||||
float _4_sat = max(max(_1_sda.x, _1_sda.y), _1_sda.z) - min(min(_1_sda.x, _1_sda.y), _1_sda.z);
|
||||
|
||||
if (_2_dsa.x <= _2_dsa.y) {
|
||||
if (_2_dsa.y <= _2_dsa.z) {
|
||||
_3_blend_set_color_saturation = _blend_set_color_saturation_helper(_2_dsa, _4_sat);
|
||||
@ -46,27 +43,20 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
|
||||
}
|
||||
float3 _5_blend_set_color_luminance;
|
||||
float _6_lum = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
float3 _7_result = (_6_lum - dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_blend_set_color_saturation)) + _3_blend_set_color_saturation;
|
||||
|
||||
float _8_minComp = min(min(_7_result.x, _7_result.y), _7_result.z);
|
||||
float _9_maxComp = max(max(_7_result.x, _7_result.y), _7_result.z);
|
||||
if (_8_minComp < 0.0 && _6_lum != _8_minComp) {
|
||||
float _10_d = _6_lum - _8_minComp;
|
||||
_7_result = _6_lum + (_7_result - _6_lum) * (_6_lum / _10_d);
|
||||
|
||||
}
|
||||
if (_9_maxComp > _0_alpha && _9_maxComp != _6_lum) {
|
||||
float3 _11_n = (_7_result - _6_lum) * (_0_alpha - _6_lum);
|
||||
float _12_d = _9_maxComp - _6_lum;
|
||||
_5_blend_set_color_luminance = _6_lum + _11_n / _12_d;
|
||||
|
||||
} else {
|
||||
_5_blend_set_color_luminance = _7_result;
|
||||
}
|
||||
_out.sk_FragColor = float4((((_5_blend_set_color_luminance + _in.dst.xyz) - _2_dsa) + _in.src.xyz) - _1_sda, (_in.src.w + _in.dst.w) - _0_alpha);
|
||||
|
||||
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
|
||||
float _7_n = sat * (minMidMax.y - minMidMax.x);
|
||||
float _8_d = minMidMax.z - minMidMax.x;
|
||||
return vec3(0.0, _7_n / _8_d, sat);
|
||||
|
||||
} else {
|
||||
return vec3(0.0);
|
||||
}
|
||||
@ -18,7 +17,6 @@ void main() {
|
||||
vec3 _2_dsa = dst.xyz * src.w;
|
||||
vec3 _3_blend_set_color_saturation;
|
||||
float _4_sat = max(max(_1_sda.x, _1_sda.y), _1_sda.z) - min(min(_1_sda.x, _1_sda.y), _1_sda.z);
|
||||
|
||||
if (_2_dsa.x <= _2_dsa.y) {
|
||||
if (_2_dsa.y <= _2_dsa.z) {
|
||||
_3_blend_set_color_saturation = _blend_set_color_saturation_helper(_2_dsa, _4_sat);
|
||||
@ -36,26 +34,19 @@ void main() {
|
||||
}
|
||||
vec3 _5_blend_set_color_luminance;
|
||||
float _6_lum = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _2_dsa);
|
||||
|
||||
vec3 _7_result = (_6_lum - dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), _3_blend_set_color_saturation)) + _3_blend_set_color_saturation;
|
||||
|
||||
float _8_minComp = min(min(_7_result.x, _7_result.y), _7_result.z);
|
||||
float _9_maxComp = max(max(_7_result.x, _7_result.y), _7_result.z);
|
||||
if (_8_minComp < 0.0 && _6_lum != _8_minComp) {
|
||||
float _10_d = _6_lum - _8_minComp;
|
||||
_7_result = _6_lum + (_7_result - _6_lum) * (_6_lum / _10_d);
|
||||
|
||||
}
|
||||
if (_9_maxComp > _0_alpha && _9_maxComp != _6_lum) {
|
||||
vec3 _11_n = (_7_result - _6_lum) * (_0_alpha - _6_lum);
|
||||
float _12_d = _9_maxComp - _6_lum;
|
||||
_5_blend_set_color_luminance = _6_lum + _11_n / _12_d;
|
||||
|
||||
} else {
|
||||
_5_blend_set_color_luminance = _7_result;
|
||||
}
|
||||
sk_FragColor = vec4((((_5_blend_set_color_luminance + dst.xyz) - _2_dsa) + src.xyz) - _1_sda, (src.w + dst.w) - _0_alpha);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src + (1.0 - src) * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.src + (1.0 - _in.src) * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src + (1.0 - src) * dst;
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ float _soft_light_component(vec2 s, vec2 d) {
|
||||
if (2.0 * s.x <= s.y) {
|
||||
float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
|
||||
return (_2_n / d.y + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0);
|
||||
|
||||
} else if (4.0 * d.x <= d.y) {
|
||||
float DSqd = d.x * d.x;
|
||||
float DCub = DSqd * d.x;
|
||||
@ -14,12 +13,10 @@ float _soft_light_component(vec2 s, vec2 d) {
|
||||
float DaCub = DaSqd * d.y;
|
||||
float _3_n = ((DaSqd * (s.x - d.x * ((3.0 * s.y - 6.0 * s.x) - 1.0)) + ((12.0 * d.y) * DSqd) * (s.y - 2.0 * s.x)) - (16.0 * DCub) * (s.y - 2.0 * s.x)) - DaCub * s.x;
|
||||
return _3_n / DaSqd;
|
||||
|
||||
} else {
|
||||
return ((d.x * ((s.y - 2.0 * s.x) + 1.0) + s.x) - sqrt(d.y * d.x) * (s.y - 2.0 * s.x)) - d.y * s.x;
|
||||
}
|
||||
}
|
||||
void main() {
|
||||
sk_FragColor = dst.w == 0.0 ? src : vec4(_soft_light_component(src.xw, dst.xw), _soft_light_component(src.yw, dst.yw), _soft_light_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ float _soft_light_component(float2 s, float2 d) {
|
||||
if (2.0 * s.x <= s.y) {
|
||||
float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
|
||||
return (_2_n / d.y + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0);
|
||||
|
||||
} else if (4.0 * d.x <= d.y) {
|
||||
float DSqd = d.x * d.x;
|
||||
float DCub = DSqd * d.x;
|
||||
@ -20,17 +19,14 @@ float _soft_light_component(float2 s, float2 d) {
|
||||
float DaCub = DaSqd * d.y;
|
||||
float _3_n = ((DaSqd * (s.x - d.x * ((3.0 * s.y - 6.0 * s.x) - 1.0)) + ((12.0 * d.y) * DSqd) * (s.y - 2.0 * s.x)) - (16.0 * DCub) * (s.y - 2.0 * s.x)) - DaCub * s.x;
|
||||
return _3_n / DaSqd;
|
||||
|
||||
} else {
|
||||
return ((d.x * ((s.y - 2.0 * s.x) + 1.0) + s.x) - sqrt(d.y * d.x) * (s.y - 2.0 * s.x)) - d.y * s.x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.dst.w == 0.0 ? _in.src : float4(_soft_light_component(_in.src.xw, _in.dst.xw), _soft_light_component(_in.src.yw, _in.dst.yw), _soft_light_component(_in.src.zw, _in.dst.zw), _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ float _soft_light_component(vec2 s, vec2 d) {
|
||||
if (2.0 * s.x <= s.y) {
|
||||
float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
|
||||
return (_2_n / d.y + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0);
|
||||
|
||||
} else if (4.0 * d.x <= d.y) {
|
||||
float DSqd = d.x * d.x;
|
||||
float DCub = DSqd * d.x;
|
||||
@ -14,12 +13,10 @@ float _soft_light_component(vec2 s, vec2 d) {
|
||||
float DaCub = DaSqd * d.y;
|
||||
float _3_n = ((DaSqd * (s.x - d.x * ((3.0 * s.y - 6.0 * s.x) - 1.0)) + ((12.0 * d.y) * DSqd) * (s.y - 2.0 * s.x)) - (16.0 * DCub) * (s.y - 2.0 * s.x)) - DaCub * s.x;
|
||||
return _3_n / DaSqd;
|
||||
|
||||
} else {
|
||||
return ((d.x * ((s.y - 2.0 * s.x) + 1.0) + s.x) - sqrt(d.y * d.x) * (s.y - 2.0 * s.x)) - d.y * s.x;
|
||||
}
|
||||
}
|
||||
void main() {
|
||||
sk_FragColor = dst.w == 0.0 ? src : vec4(_soft_light_component(src.xw, dst.xw), _soft_light_component(src.yw, dst.yw), _soft_light_component(src.zw, dst.zw), src.w + (1.0 - src.w) * dst.w);
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.src;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.dst.w * _in.src + (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = dst.w * src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src * dst.w;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.src * _in.dst.w;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src * dst.w;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - dst.w) * src;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = (1.0 - _in.dst.w) * _in.src;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - dst.w) * src;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = _in.src + (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = src;
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - dst.w) * src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,9 @@ struct Outputs {
|
||||
float4 sk_FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
|
||||
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
||||
Outputs _out;
|
||||
(void)_out;
|
||||
_out.sk_FragColor = (1.0 - _in.dst.w) * _in.src + (1.0 - _in.src.w) * _in.dst;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ in vec4 src;
|
||||
in vec4 dst;
|
||||
void main() {
|
||||
sk_FragColor = (1.0 - dst.w) * src + (1.0 - src.w) * dst;
|
||||
|
||||
}
|
||||
|
@ -2,9 +2,6 @@
|
||||
uniform float unknownInput;
|
||||
void main() {
|
||||
int inlineTest = 0 / 0;
|
||||
|
||||
inlineTest = (ivec4(0) / 0).x;
|
||||
|
||||
inlineTest = int(unknownInput) / 0;
|
||||
|
||||
}
|
||||
|
@ -14,5 +14,4 @@ vec4 main() {
|
||||
bool _8_i = true;
|
||||
bool _9_j = false;
|
||||
return ((((((((_0_a && !_1_b) && _2_c) && !_3_d) && _4_e) && !_5_f) && _6_g) && !_7_h) && _8_i) && !_9_j ? colorGreen : colorRed;
|
||||
|
||||
}
|
||||
|
@ -70,5 +70,4 @@ vec4 main() {
|
||||
_1_x /= 2.0;
|
||||
_0_ok = _0_ok && _1_x == -1.0;
|
||||
return _0_ok ? colorGreen : colorRed;
|
||||
|
||||
}
|
||||
|
@ -69,5 +69,4 @@ vec4 main() {
|
||||
_2_x /= 2;
|
||||
_1_ok = _1_ok && _2_x == -1;
|
||||
return _1_ok ? colorGreen : colorRed;
|
||||
|
||||
}
|
||||
|
@ -19,5 +19,4 @@ vec4 main() {
|
||||
_1_x = 33;
|
||||
_0_ok = _0_ok && _1_x == 33;
|
||||
return _0_ok ? colorGreen : colorRed;
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user