Revert "Reland "Remove inliner from IR generation stage.""

This reverts commit e497a08065.

Reason for revert: Pinpoint disagrees

Original change's description:
> Reland "Remove inliner from IR generation stage."
>
> This reverts commit 941fc7174f.
>
> Reason for revert: performance now seems to be roughly equal or better
> (~1%) over several trials.
> Nanobench: http://screen/A8e8sojaXBgbMgF
>
> Original change's description:
> > Revert "Remove inliner from IR generation stage."
> >
> > This reverts commit 21d7778cb5.
> >
> > Reason for revert: Pinpoint absolutely hates this change
> >
> > Original change's description:
> > > Remove inliner from IR generation stage.
> > >
> > > There is no need to inline code during IR generation, as the optimizer
> > > can now handle this.
> > >
> > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971
> > > Commit-Queue: John Stiles <johnstiles@google.com>
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Auto-Submit: John Stiles <johnstiles@google.com>
> >
> > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
> >
> > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976
> > Reviewed-by: John Stiles <johnstiles@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I79149467565f22f53b8c28868dd53b80f3421137
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325626
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This commit is contained in:
John Stiles 2020-10-13 11:19:41 -04:00 committed by Skia Commit-Bot
parent 1c03d336d7
commit 4c412bce4c
128 changed files with 1005 additions and 743 deletions

View File

@ -47,6 +47,7 @@ public:
{
_0_unpremul = half4(inputColor.xyz / max(inputColor.w, 9.9999997473787516e-05), inputColor.w);
}
inputColor = _0_unpremul;
}

View File

@ -58,6 +58,7 @@ half4 _0_unpremul;
{
_0_unpremul = half4(inColor.xyz / max(inColor.w, 9.9999997473787516e-05), inColor.w);
}
half4 color = _0_unpremul;
@if (%s) {

View File

@ -88,7 +88,7 @@ Compiler::Compiler(Flags flags)
, fContext(std::make_shared<Context>())
, fErrorCount(0) {
fRootSymbolTable = std::make_shared<SymbolTable>(this);
fIRGenerator = std::make_unique<IRGenerator>(fContext.get(), *this);
fIRGenerator = std::make_unique<IRGenerator>(fContext.get(), &fInliner, *this);
#define ADD_TYPE(t) fRootSymbolTable->addWithoutOwnership(fContext->f##t##_Type.get())
ADD_TYPE(Void);
ADD_TYPE(Float);

View File

@ -103,10 +103,29 @@ public:
IRGenerator* fIR;
};
IRGenerator::IRGenerator(const Context* context, ErrorReporter& errorReporter)
class AutoDisableInline {
public:
AutoDisableInline(IRGenerator* ir, bool canInline = false)
: fIR(ir) {
fOldCanInline = ir->fCanInline;
fIR->fCanInline &= canInline;
}
~AutoDisableInline() {
fIR->fCanInline = fOldCanInline;
}
IRGenerator* fIR;
bool fOldCanInline;
};
IRGenerator::IRGenerator(const Context* context, Inliner* inliner, ErrorReporter& errorReporter)
: fContext(*context)
, fInliner(inliner)
, fErrors(errorReporter)
, fModifiers(new ModifiersPool()) {}
, fModifiers(new ModifiersPool()) {
SkASSERT(fInliner);
}
void IRGenerator::pushSymbolTable() {
fSymbolTable.reset(new SymbolTable(std::move(fSymbolTable)));
@ -483,8 +502,11 @@ std::unique_ptr<Statement> IRGenerator::convertIf(const ASTNode& n) {
return std::make_unique<Nop>();
}
}
return std::make_unique<IfStatement>(n.fOffset, n.getBool(), std::move(test),
auto ifStmt = std::make_unique<IfStatement>(n.fOffset, n.getBool(), std::move(test),
std::move(ifTrue), std::move(ifFalse));
fInliner->ensureScopedBlocks(ifStmt->ifTrue().get(), ifStmt.get());
fInliner->ensureScopedBlocks(ifStmt->ifFalse().get(), ifStmt.get());
return std::move(ifStmt);
}
std::unique_ptr<Statement> IRGenerator::convertFor(const ASTNode& f) {
@ -502,14 +524,17 @@ std::unique_ptr<Statement> IRGenerator::convertFor(const ASTNode& f) {
++iter;
std::unique_ptr<Expression> test;
if (*iter) {
AutoDisableInline disableInline(this);
test = this->coerce(this->convertExpression(*iter), *fContext.fBool_Type);
if (!test) {
return nullptr;
}
}
++iter;
std::unique_ptr<Expression> next;
if (*iter) {
AutoDisableInline disableInline(this);
next = this->convertExpression(*iter);
if (!next) {
return nullptr;
@ -520,16 +545,22 @@ std::unique_ptr<Statement> IRGenerator::convertFor(const ASTNode& f) {
if (!statement) {
return nullptr;
}
return std::make_unique<ForStatement>(f.fOffset, std::move(initializer), std::move(test),
std::move(next), std::move(statement), fSymbolTable);
auto forStmt = std::make_unique<ForStatement>(f.fOffset, std::move(initializer),
std::move(test), std::move(next),
std::move(statement), fSymbolTable);
fInliner->ensureScopedBlocks(forStmt->statement().get(), forStmt.get());
return std::move(forStmt);
}
std::unique_ptr<Statement> IRGenerator::convertWhile(const ASTNode& w) {
SkASSERT(w.fKind == ASTNode::Kind::kWhile);
AutoLoopLevel level(this);
std::unique_ptr<Expression> test;
auto iter = w.begin();
std::unique_ptr<Expression> test = this->coerce(this->convertExpression(*(iter++)),
*fContext.fBool_Type);
{
AutoDisableInline disableInline(this);
test = this->coerce(this->convertExpression(*(iter++)), *fContext.fBool_Type);
}
if (!test) {
return nullptr;
}
@ -537,7 +568,10 @@ std::unique_ptr<Statement> IRGenerator::convertWhile(const ASTNode& w) {
if (!statement) {
return nullptr;
}
return std::make_unique<WhileStatement>(w.fOffset, std::move(test), std::move(statement));
auto whileStmt = std::make_unique<WhileStatement>(w.fOffset, std::move(test),
std::move(statement));
fInliner->ensureScopedBlocks(whileStmt->statement().get(), whileStmt.get());
return std::move(whileStmt);
}
std::unique_ptr<Statement> IRGenerator::convertDo(const ASTNode& d) {
@ -548,12 +582,17 @@ std::unique_ptr<Statement> IRGenerator::convertDo(const ASTNode& d) {
if (!statement) {
return nullptr;
}
std::unique_ptr<Expression> test =
this->coerce(this->convertExpression(*(iter++)), *fContext.fBool_Type);
std::unique_ptr<Expression> test;
{
AutoDisableInline disableInline(this);
test = this->coerce(this->convertExpression(*(iter++)), *fContext.fBool_Type);
}
if (!test) {
return nullptr;
}
return std::make_unique<DoStatement>(d.fOffset, std::move(statement), std::move(test));
auto doStmt = std::make_unique<DoStatement>(d.fOffset, std::move(statement), std::move(test));
fInliner->ensureScopedBlocks(doStmt->statement().get(), doStmt.get());
return std::move(doStmt);
}
std::unique_ptr<Statement> IRGenerator::convertSwitch(const ASTNode& s) {
@ -1853,7 +1892,14 @@ std::unique_ptr<Expression> IRGenerator::convertBinaryExpression(const ASTNode&
return nullptr;
}
Token::Kind op = expression.getToken().fKind;
std::unique_ptr<Expression> right = this->convertExpression(*(iter++));
std::unique_ptr<Expression> right;
{
// Can't inline the right side of a short-circuiting boolean, because our inlining
// approach runs things out of order.
AutoDisableInline disableInline(this, /*canInline=*/(op != Token::Kind::TK_LOGICALAND &&
op != Token::Kind::TK_LOGICALOR));
right = this->convertExpression(*(iter++));
}
if (!right) {
return nullptr;
}
@ -1908,14 +1954,19 @@ std::unique_ptr<Expression> IRGenerator::convertTernaryExpression(const ASTNode&
if (!test) {
return nullptr;
}
std::unique_ptr<Expression> ifTrue = this->convertExpression(*(iter++));
std::unique_ptr<Expression> ifTrue;
std::unique_ptr<Expression> ifFalse;
{
AutoDisableInline disableInline(this);
ifTrue = this->convertExpression(*(iter++));
if (!ifTrue) {
return nullptr;
}
std::unique_ptr<Expression> ifFalse = this->convertExpression(*(iter++));
ifFalse = this->convertExpression(*(iter++));
if (!ifFalse) {
return nullptr;
}
}
const Type* trueType;
const Type* falseType;
const Type* resultType;
@ -2039,7 +2090,20 @@ std::unique_ptr<Expression> IRGenerator::call(int offset,
}
}
return std::make_unique<FunctionCall>(offset, returnType, &function, std::move(arguments));
auto funcCall = std::make_unique<FunctionCall>(offset, returnType, &function,
std::move(arguments));
if (fCanInline &&
fInliner->isSafeToInline(funcCall->function().definition()) &&
!fInliner->isLargeFunction(funcCall->function().definition())) {
Inliner::InlinedCall inlinedCall = fInliner->inlineCall(funcCall.get(), fSymbolTable.get(),
fCurrentFunction);
if (inlinedCall.fInlinedBody) {
fExtraStatements.push_back(std::move(inlinedCall.fInlinedBody));
}
return std::move(inlinedCall.fReplacementExpr);
}
return std::move(funcCall);
}
/**

View File

@ -14,6 +14,7 @@
#include "src/sksl/SkSLASTFile.h"
#include "src/sksl/SkSLASTNode.h"
#include "src/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLInliner.h"
#include "src/sksl/ir/SkSLBlock.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLExtension.h"
@ -94,7 +95,7 @@ private:
*/
class IRGenerator {
public:
IRGenerator(const Context* context, ErrorReporter& errorReporter);
IRGenerator(const Context* context, Inliner* inliner, ErrorReporter& errorReporter);
struct IRBundle {
std::vector<std::unique_ptr<ProgramElement>> fElements;
@ -219,6 +220,7 @@ private:
const Program::Settings* fSettings = nullptr;
Program::Kind fKind;
Inliner* fInliner = nullptr;
std::unique_ptr<ASTFile> fFile;
const FunctionDeclaration* fCurrentFunction = nullptr;
std::unordered_map<String, Program::Settings::Value> fCapsMap;

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,13 +32,14 @@ vec4 blend_color(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _2_blend_color;
vec4 _0_blend_color;
{
float _3_alpha = dst.w * src.w;
vec3 _4_sda = src.xyz * dst.w;
vec3 _5_dsa = dst.xyz * src.w;
_2_blend_color = vec4((((_blend_set_color_luminance(_4_sda, _3_alpha, _5_dsa) + dst.xyz) - _5_dsa) + src.xyz) - _4_sda, (src.w + dst.w) - _3_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_color = vec4((((_blend_set_color_luminance(_2_sda, _1_alpha, _3_dsa) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _2_blend_color;
sk_FragColor = _0_blend_color;
}

View File

@ -14,17 +14,17 @@ float _blend_color_luminance(float3 color) {
return dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
float3 _blend_set_color_luminance(float3 hueSatColor, float alpha, float3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
float3 result = (lum - _1_blend_color_luminance) + hueSatColor;
float3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -42,14 +42,15 @@ float4 blend_color(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _2_blend_color;
float4 _0_blend_color;
{
float _3_alpha = _in.dst.w * _in.src.w;
float3 _4_sda = _in.src.xyz * _in.dst.w;
float3 _5_dsa = _in.dst.xyz * _in.src.w;
_2_blend_color = float4((((_blend_set_color_luminance(_4_sda, _3_alpha, _5_dsa) + _in.dst.xyz) - _5_dsa) + _in.src.xyz) - _4_sda, (_in.src.w + _in.dst.w) - _3_alpha);
float _1_alpha = _in.dst.w * _in.src.w;
float3 _2_sda = _in.src.xyz * _in.dst.w;
float3 _3_dsa = _in.dst.xyz * _in.src.w;
_0_blend_color = float4((((_blend_set_color_luminance(_2_sda, _1_alpha, _3_dsa) + _in.dst.xyz) - _3_dsa) + _in.src.xyz) - _2_sda, (_in.src.w + _in.dst.w) - _1_alpha);
}
_out->sk_FragColor = _2_blend_color;
_out->sk_FragColor = _0_blend_color;
return *_out;
}

View File

@ -11,12 +11,12 @@ float _color_burn_component(vec2 s, vec2 d) {
} else if (s.x == 0.0) {
return d.x * (1.0 - s.y);
} else {
float _0_guarded_divide;
float _1_n = (d.y - d.x) * s.y;
float _1_guarded_divide;
float _2_n = (d.y - d.x) * s.y;
{
_0_guarded_divide = _1_n / s.x;
_1_guarded_divide = _2_n / s.x;
}
float delta = max(0.0, d.y - _0_guarded_divide);
float delta = max(0.0, d.y - _1_guarded_divide);
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
}
@ -25,10 +25,11 @@ vec4 blend_color_burn(vec4 src, vec4 dst) {
return 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);
}
void main() {
vec4 _2_blend_color_burn;
vec4 _0_blend_color_burn;
{
_2_blend_color_burn = 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);
_0_blend_color_burn = 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);
}
sk_FragColor = _2_blend_color_burn;
sk_FragColor = _0_blend_color_burn;
}

View File

@ -19,12 +19,12 @@ float _color_burn_component(float2 s, float2 d) {
} else if (s.x == 0.0) {
return d.x * (1.0 - s.y);
} else {
float _0_guarded_divide;
float _1_n = (d.y - d.x) * s.y;
float _1_guarded_divide;
float _2_n = (d.y - d.x) * s.y;
{
_0_guarded_divide = _1_n / s.x;
_1_guarded_divide = _2_n / s.x;
}
float delta = max(0.0, d.y - _0_guarded_divide);
float delta = max(0.0, d.y - _1_guarded_divide);
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
}
@ -35,11 +35,12 @@ float4 blend_color_burn(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _2_blend_color_burn;
float4 _0_blend_color_burn;
{
_2_blend_color_burn = 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);
_0_blend_color_burn = 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);
}
_out->sk_FragColor = _2_blend_color_burn;
_out->sk_FragColor = _0_blend_color_burn;
return *_out;
}

View File

@ -11,12 +11,12 @@ float _color_burn_component(vec2 s, vec2 d) {
} else if (s.x == 0.0) {
return d.x * (1.0 - s.y);
} else {
float _0_guarded_divide;
float _1_n = (d.y - d.x) * s.y;
float _1_guarded_divide;
float _2_n = (d.y - d.x) * s.y;
{
_0_guarded_divide = _1_n / s.x;
_1_guarded_divide = _2_n / s.x;
}
float delta = max(0.0, d.y - _0_guarded_divide);
float delta = max(0.0, d.y - _1_guarded_divide);
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
}
@ -25,10 +25,11 @@ vec4 blend_color_burn(vec4 src, vec4 dst) {
return 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);
}
void main() {
vec4 _2_blend_color_burn;
vec4 _0_blend_color_burn;
{
_2_blend_color_burn = 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);
_0_blend_color_burn = 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);
}
sk_FragColor = _2_blend_color_burn;
sk_FragColor = _0_blend_color_burn;
}

View File

@ -13,12 +13,12 @@ float _color_dodge_component(vec2 s, vec2 d) {
if (delta == 0.0) {
return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
} else {
float _0_guarded_divide;
float _1_n = d.x * s.y;
float _1_guarded_divide;
float _2_n = d.x * s.y;
{
_0_guarded_divide = _1_n / delta;
_1_guarded_divide = _2_n / delta;
}
delta = min(d.y, _0_guarded_divide);
delta = min(d.y, _1_guarded_divide);
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
}
@ -28,10 +28,11 @@ vec4 blend_color_dodge(vec4 src, vec4 dst) {
return 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);
}
void main() {
vec4 _2_blend_color_dodge;
vec4 _0_blend_color_dodge;
{
_2_blend_color_dodge = 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);
_0_blend_color_dodge = 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);
}
sk_FragColor = _2_blend_color_dodge;
sk_FragColor = _0_blend_color_dodge;
}

View File

@ -21,12 +21,12 @@ float _color_dodge_component(float2 s, float2 d) {
if (delta == 0.0) {
return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
} else {
float _0_guarded_divide;
float _1_n = d.x * s.y;
float _1_guarded_divide;
float _2_n = d.x * s.y;
{
_0_guarded_divide = _1_n / delta;
_1_guarded_divide = _2_n / delta;
}
delta = min(d.y, _0_guarded_divide);
delta = min(d.y, _1_guarded_divide);
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
}
@ -38,11 +38,12 @@ float4 blend_color_dodge(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _2_blend_color_dodge;
float4 _0_blend_color_dodge;
{
_2_blend_color_dodge = 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);
_0_blend_color_dodge = 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);
}
_out->sk_FragColor = _2_blend_color_dodge;
_out->sk_FragColor = _0_blend_color_dodge;
return *_out;
}

View File

@ -13,12 +13,12 @@ float _color_dodge_component(vec2 s, vec2 d) {
if (delta == 0.0) {
return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
} else {
float _0_guarded_divide;
float _1_n = d.x * s.y;
float _1_guarded_divide;
float _2_n = d.x * s.y;
{
_0_guarded_divide = _1_n / delta;
_1_guarded_divide = _2_n / delta;
}
delta = min(d.y, _0_guarded_divide);
delta = min(d.y, _1_guarded_divide);
return (delta * s.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y);
}
@ -28,10 +28,11 @@ vec4 blend_color_dodge(vec4 src, vec4 dst) {
return 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);
}
void main() {
vec4 _2_blend_color_dodge;
vec4 _0_blend_color_dodge;
{
_2_blend_color_dodge = 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);
_0_blend_color_dodge = 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);
}
sk_FragColor = _2_blend_color_dodge;
sk_FragColor = _0_blend_color_dodge;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,13 +32,14 @@ vec4 blend_color(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(sda, alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _2_blend_color;
vec4 _0_blend_color;
{
float _3_alpha = dst.w * src.w;
vec3 _4_sda = src.xyz * dst.w;
vec3 _5_dsa = dst.xyz * src.w;
_2_blend_color = vec4((((_blend_set_color_luminance(_4_sda, _3_alpha, _5_dsa) + dst.xyz) - _5_dsa) + src.xyz) - _4_sda, (src.w + dst.w) - _3_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_color = vec4((((_blend_set_color_luminance(_2_sda, _1_alpha, _3_dsa) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _2_blend_color;
sk_FragColor = _0_blend_color;
}

View File

@ -6,27 +6,28 @@ vec4 blend_src_over(vec4 src, vec4 dst) {
return src + (1.0 - src.w) * dst;
}
vec4 blend_darken(vec4 src, vec4 dst) {
vec4 _0_blend_src_over;
vec4 _2_blend_src_over;
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
_2_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 result = _0_blend_src_over;
vec4 result = _2_blend_src_over;
result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
return result;
}
void main() {
vec4 _1_blend_darken;
vec4 _0_blend_darken;
{
vec4 _3_blend_src_over;
{
_3_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 _2_result = _3_blend_src_over;
vec4 _1_result = _3_blend_src_over;
_2_result.xyz = min(_2_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_1_blend_darken = _2_result;
_1_result.xyz = min(_1_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_0_blend_darken = _1_result;
}
sk_FragColor = _1_blend_darken;
sk_FragColor = _0_blend_darken;
}

View File

@ -14,11 +14,11 @@ float4 blend_src_over(float4 src, float4 dst) {
return src + (1.0 - src.w) * dst;
}
float4 blend_darken(float4 src, float4 dst) {
float4 _0_blend_src_over;
float4 _2_blend_src_over;
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
_2_blend_src_over = src + (1.0 - src.w) * dst;
}
float4 result = _0_blend_src_over;
float4 result = _2_blend_src_over;
result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
return result;
@ -26,18 +26,19 @@ float4 blend_darken(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _1_blend_darken;
float4 _0_blend_darken;
{
float4 _3_blend_src_over;
{
_3_blend_src_over = _in.src + (1.0 - _in.src.w) * _in.dst;
}
float4 _2_result = _3_blend_src_over;
float4 _1_result = _3_blend_src_over;
_2_result.xyz = min(_2_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
_1_blend_darken = _2_result;
_1_result.xyz = min(_1_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
_0_blend_darken = _1_result;
}
_out->sk_FragColor = _1_blend_darken;
_out->sk_FragColor = _0_blend_darken;
return *_out;
}

View File

@ -6,27 +6,28 @@ vec4 blend_src_over(vec4 src, vec4 dst) {
return src + (1.0 - src.w) * dst;
}
vec4 blend_darken(vec4 src, vec4 dst) {
vec4 _0_blend_src_over;
vec4 _2_blend_src_over;
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
_2_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 result = _0_blend_src_over;
vec4 result = _2_blend_src_over;
result.xyz = min(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
return result;
}
void main() {
vec4 _1_blend_darken;
vec4 _0_blend_darken;
{
vec4 _3_blend_src_over;
{
_3_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 _2_result = _3_blend_src_over;
vec4 _1_result = _3_blend_src_over;
_2_result.xyz = min(_2_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_1_blend_darken = _2_result;
_1_result.xyz = min(_1_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_0_blend_darken = _1_result;
}
sk_FragColor = _1_blend_darken;
sk_FragColor = _0_blend_darken;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_difference = vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
}
sk_FragColor = _0_blend_difference;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_difference = 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);
}
_out->sk_FragColor = _0_blend_difference;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_difference = vec4((src.xyz + dst.xyz) - 2.0 * min(src.xyz * dst.w, dst.xyz * src.w), src.w + (1.0 - src.w) * dst.w);
}
sk_FragColor = _0_blend_difference;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_dst = dst;
}
sk_FragColor = _0_blend_dst;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_dst = _in.dst;
}
_out->sk_FragColor = _0_blend_dst;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_atop = dst.w * src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_src_atop;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_src_atop = _in.dst.w * _in.src + (1.0 - _in.src.w) * _in.dst;
}
_out->sk_FragColor = _0_blend_src_atop;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_atop = dst.w * src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_src_atop;
}

View File

@ -6,23 +6,24 @@ vec4 blend_src_in(vec4 src, vec4 dst) {
return src * dst.w;
}
vec4 blend_dst_in(vec4 src, vec4 dst) {
vec4 _0_blend_src_in;
vec4 _1_blend_src_in;
{
_0_blend_src_in = dst * src.w;
_1_blend_src_in = dst * src.w;
}
return _0_blend_src_in;
return _1_blend_src_in;
}
void main() {
vec4 _1_blend_dst_in;
vec4 _0_blend_dst_in;
{
vec4 _2_blend_src_in;
{
_2_blend_src_in = dst * src.w;
}
_1_blend_dst_in = _2_blend_src_in;
_0_blend_dst_in = _2_blend_src_in;
}
sk_FragColor = _1_blend_dst_in;
sk_FragColor = _0_blend_dst_in;
}

View File

@ -14,26 +14,27 @@ float4 blend_src_in(float4 src, float4 dst) {
return src * dst.w;
}
float4 blend_dst_in(float4 src, float4 dst) {
float4 _0_blend_src_in;
float4 _1_blend_src_in;
{
_0_blend_src_in = dst * src.w;
_1_blend_src_in = dst * src.w;
}
return _0_blend_src_in;
return _1_blend_src_in;
}
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _1_blend_dst_in;
float4 _0_blend_dst_in;
{
float4 _2_blend_src_in;
{
_2_blend_src_in = _in.dst * _in.src.w;
}
_1_blend_dst_in = _2_blend_src_in;
_0_blend_dst_in = _2_blend_src_in;
}
_out->sk_FragColor = _1_blend_dst_in;
_out->sk_FragColor = _0_blend_dst_in;
return *_out;
}

View File

@ -6,23 +6,24 @@ vec4 blend_src_in(vec4 src, vec4 dst) {
return src * dst.w;
}
vec4 blend_dst_in(vec4 src, vec4 dst) {
vec4 _0_blend_src_in;
vec4 _1_blend_src_in;
{
_0_blend_src_in = dst * src.w;
_1_blend_src_in = dst * src.w;
}
return _0_blend_src_in;
return _1_blend_src_in;
}
void main() {
vec4 _1_blend_dst_in;
vec4 _0_blend_dst_in;
{
vec4 _2_blend_src_in;
{
_2_blend_src_in = dst * src.w;
}
_1_blend_dst_in = _2_blend_src_in;
_0_blend_dst_in = _2_blend_src_in;
}
sk_FragColor = _1_blend_dst_in;
sk_FragColor = _0_blend_dst_in;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_dst_out = (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_dst_out;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_dst_out = (1.0 - _in.src.w) * _in.dst;
}
_out->sk_FragColor = _0_blend_dst_out;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_dst_out = (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_dst_out;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_dst_over = (1.0 - dst.w) * src + dst;
}
sk_FragColor = _0_blend_dst_over;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_dst_over = (1.0 - _in.dst.w) * _in.src + _in.dst;
}
_out->sk_FragColor = _0_blend_dst_over;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_dst_over = (1.0 - dst.w) * src + dst;
}
sk_FragColor = _0_blend_dst_over;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_dst = dst;
}
sk_FragColor = _0_blend_dst;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_exclusion = vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
}
sk_FragColor = _0_blend_exclusion;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_exclusion = 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);
}
_out->sk_FragColor = _0_blend_exclusion;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_exclusion = vec4((dst.xyz + src.xyz) - (2.0 * dst.xyz) * src.xyz, src.w + (1.0 - src.w) * dst.w);
}
sk_FragColor = _0_blend_exclusion;
}

View File

@ -6,19 +6,19 @@ 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);
}
vec4 blend_overlay(vec4 src, vec4 dst) {
float _0_blend_overlay_component;
float _1_blend_overlay_component;
{
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_1_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _4_blend_overlay_component;
float _6_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_6_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _8_blend_overlay_component;
float _9_blend_overlay_component;
{
_8_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
_9_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 result = vec4(_0_blend_overlay_component, _4_blend_overlay_component, _8_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
vec4 result = vec4(_1_blend_overlay_component, _6_blend_overlay_component, _9_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
@ -26,57 +26,58 @@ vec4 blend_overlay(vec4 src, vec4 dst) {
return result;
}
vec4 blend_hard_light(vec4 src, vec4 dst) {
vec4 _1_blend_overlay;
vec4 _2_blend_overlay;
{
float _5_blend_overlay_component;
float _7_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
_7_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
float _9_blend_overlay_component;
{
_9_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _11_blend_overlay_component;
{
_11_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
vec4 _2_result = vec4(_5_blend_overlay_component, _9_blend_overlay_component, _11_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_2_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_1_blend_overlay = _2_result;
}
return _1_blend_overlay;
}
void main() {
vec4 _3_blend_hard_light;
{
vec4 _6_blend_overlay;
{
float _10_blend_overlay_component;
{
_10_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
_10_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _12_blend_overlay_component;
{
_12_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
_12_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
vec4 _3_result = vec4(_7_blend_overlay_component, _10_blend_overlay_component, _12_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_3_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_2_blend_overlay = _3_result;
}
return _2_blend_overlay;
}
void main() {
vec4 _0_blend_hard_light;
{
vec4 _4_blend_overlay;
{
float _8_blend_overlay_component;
{
_8_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
float _11_blend_overlay_component;
{
_11_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _13_blend_overlay_component;
{
_13_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
vec4 _7_result = vec4(_10_blend_overlay_component, _12_blend_overlay_component, _13_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
vec4 _5_result = vec4(_8_blend_overlay_component, _11_blend_overlay_component, _13_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_7_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_6_blend_overlay = _7_result;
_5_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_4_blend_overlay = _5_result;
}
_3_blend_hard_light = _6_blend_overlay;
_0_blend_hard_light = _4_blend_overlay;
}
sk_FragColor = _3_blend_hard_light;
sk_FragColor = _0_blend_hard_light;
}

View File

@ -14,19 +14,19 @@ 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);
}
float4 blend_overlay(float4 src, float4 dst) {
float _0_blend_overlay_component;
float _1_blend_overlay_component;
{
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_1_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _4_blend_overlay_component;
float _6_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_6_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _8_blend_overlay_component;
float _9_blend_overlay_component;
{
_8_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
_9_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
float4 result = float4(_0_blend_overlay_component, _4_blend_overlay_component, _8_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
float4 result = float4(_1_blend_overlay_component, _6_blend_overlay_component, _9_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
@ -34,60 +34,61 @@ float4 blend_overlay(float4 src, float4 dst) {
return result;
}
float4 blend_hard_light(float4 src, float4 dst) {
float4 _1_blend_overlay;
float4 _2_blend_overlay;
{
float _5_blend_overlay_component;
float _7_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
_7_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
float _9_blend_overlay_component;
float _10_blend_overlay_component;
{
_9_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
_10_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _11_blend_overlay_component;
float _12_blend_overlay_component;
{
_11_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
_12_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
float4 _2_result = float4(_5_blend_overlay_component, _9_blend_overlay_component, _11_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
float4 _3_result = float4(_7_blend_overlay_component, _10_blend_overlay_component, _12_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_2_result.xyz = _2_result.xyz + src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_1_blend_overlay = _2_result;
_3_result.xyz = _3_result.xyz + src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_2_blend_overlay = _3_result;
}
return _1_blend_overlay;
return _2_blend_overlay;
}
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _3_blend_hard_light;
float4 _0_blend_hard_light;
{
float4 _6_blend_overlay;
float4 _4_blend_overlay;
{
float _10_blend_overlay_component;
float _8_blend_overlay_component;
{
_10_blend_overlay_component = 2.0 * _in.src.x <= _in.src.w ? (2.0 * _in.dst.x) * _in.src.x : _in.dst.w * _in.src.w - (2.0 * (_in.src.w - _in.src.x)) * (_in.dst.w - _in.dst.x);
_8_blend_overlay_component = 2.0 * _in.src.x <= _in.src.w ? (2.0 * _in.dst.x) * _in.src.x : _in.dst.w * _in.src.w - (2.0 * (_in.src.w - _in.src.x)) * (_in.dst.w - _in.dst.x);
}
float _12_blend_overlay_component;
float _11_blend_overlay_component;
{
_12_blend_overlay_component = 2.0 * _in.src.y <= _in.src.w ? (2.0 * _in.dst.y) * _in.src.y : _in.dst.w * _in.src.w - (2.0 * (_in.src.w - _in.src.y)) * (_in.dst.w - _in.dst.y);
_11_blend_overlay_component = 2.0 * _in.src.y <= _in.src.w ? (2.0 * _in.dst.y) * _in.src.y : _in.dst.w * _in.src.w - (2.0 * (_in.src.w - _in.src.y)) * (_in.dst.w - _in.dst.y);
}
float _13_blend_overlay_component;
{
_13_blend_overlay_component = 2.0 * _in.src.z <= _in.src.w ? (2.0 * _in.dst.z) * _in.src.z : _in.dst.w * _in.src.w - (2.0 * (_in.src.w - _in.src.z)) * (_in.dst.w - _in.dst.z);
}
float4 _7_result = float4(_10_blend_overlay_component, _12_blend_overlay_component, _13_blend_overlay_component, _in.dst.w + (1.0 - _in.dst.w) * _in.src.w);
float4 _5_result = float4(_8_blend_overlay_component, _11_blend_overlay_component, _13_blend_overlay_component, _in.dst.w + (1.0 - _in.dst.w) * _in.src.w);
_7_result.xyz = _7_result.xyz + _in.src.xyz * (1.0 - _in.dst.w) + _in.dst.xyz * (1.0 - _in.src.w);
_6_blend_overlay = _7_result;
_5_result.xyz = _5_result.xyz + _in.src.xyz * (1.0 - _in.dst.w) + _in.dst.xyz * (1.0 - _in.src.w);
_4_blend_overlay = _5_result;
}
_3_blend_hard_light = _6_blend_overlay;
_0_blend_hard_light = _4_blend_overlay;
}
_out->sk_FragColor = _3_blend_hard_light;
_out->sk_FragColor = _0_blend_hard_light;
return *_out;
}

View File

@ -6,19 +6,19 @@ 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);
}
vec4 blend_overlay(vec4 src, vec4 dst) {
float _0_blend_overlay_component;
float _1_blend_overlay_component;
{
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_1_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _4_blend_overlay_component;
float _6_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_6_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _8_blend_overlay_component;
float _9_blend_overlay_component;
{
_8_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
_9_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 result = vec4(_0_blend_overlay_component, _4_blend_overlay_component, _8_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
vec4 result = vec4(_1_blend_overlay_component, _6_blend_overlay_component, _9_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
@ -26,57 +26,58 @@ vec4 blend_overlay(vec4 src, vec4 dst) {
return result;
}
vec4 blend_hard_light(vec4 src, vec4 dst) {
vec4 _1_blend_overlay;
vec4 _2_blend_overlay;
{
float _5_blend_overlay_component;
float _7_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
_7_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
float _9_blend_overlay_component;
{
_9_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _11_blend_overlay_component;
{
_11_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
vec4 _2_result = vec4(_5_blend_overlay_component, _9_blend_overlay_component, _11_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_2_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_1_blend_overlay = _2_result;
}
return _1_blend_overlay;
}
void main() {
vec4 _3_blend_hard_light;
{
vec4 _6_blend_overlay;
{
float _10_blend_overlay_component;
{
_10_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
_10_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _12_blend_overlay_component;
{
_12_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
_12_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
vec4 _3_result = vec4(_7_blend_overlay_component, _10_blend_overlay_component, _12_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_3_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_2_blend_overlay = _3_result;
}
return _2_blend_overlay;
}
void main() {
vec4 _0_blend_hard_light;
{
vec4 _4_blend_overlay;
{
float _8_blend_overlay_component;
{
_8_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
float _11_blend_overlay_component;
{
_11_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _13_blend_overlay_component;
{
_13_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
vec4 _7_result = vec4(_10_blend_overlay_component, _12_blend_overlay_component, _13_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
vec4 _5_result = vec4(_8_blend_overlay_component, _11_blend_overlay_component, _13_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
_7_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_6_blend_overlay = _7_result;
_5_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_4_blend_overlay = _5_result;
}
_3_blend_hard_light = _6_blend_overlay;
_0_blend_hard_light = _4_blend_overlay;
}
sk_FragColor = _3_blend_hard_light;
sk_FragColor = _0_blend_hard_light;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,55 +32,55 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
return minMidMax.x < minMidMax.z ? vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat) : vec3(0.0);
}
vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
float _2_blend_color_saturation;
float _6_blend_color_saturation;
{
_2_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
_6_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
}
float sat = _2_blend_color_saturation;
float sat = _6_blend_color_saturation;
if (hueLumColor.x <= hueLumColor.y) {
if (hueLumColor.y <= hueLumColor.z) {
vec3 _3_blend_set_color_saturation_helper;
{
_3_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xyz = _3_blend_set_color_saturation_helper;
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _4_blend_set_color_saturation_helper;
{
_4_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xzy = _4_blend_set_color_saturation_helper;
} else {
vec3 _5_blend_set_color_saturation_helper;
{
_5_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _5_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _6_blend_set_color_saturation_helper;
{
_6_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _6_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _7_blend_set_color_saturation_helper;
{
_7_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
_7_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.yzx = _7_blend_set_color_saturation_helper;
hueLumColor.xyz = _7_blend_set_color_saturation_helper;
} else {
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _8_blend_set_color_saturation_helper;
{
_8_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
_8_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.zyx = _8_blend_set_color_saturation_helper;
hueLumColor.xzy = _8_blend_set_color_saturation_helper;
} else {
vec3 _9_blend_set_color_saturation_helper;
{
_9_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _9_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _10_blend_set_color_saturation_helper;
{
_10_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _10_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _11_blend_set_color_saturation_helper;
{
_11_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yzx = _11_blend_set_color_saturation_helper;
} else {
vec3 _12_blend_set_color_saturation_helper;
{
_12_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zyx = _12_blend_set_color_saturation_helper;
}
return hueLumColor;
@ -92,13 +92,14 @@ vec4 blend_hue(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _9_blend_hue;
vec4 _0_blend_hue;
{
float _10_alpha = dst.w * src.w;
vec3 _11_sda = src.xyz * dst.w;
vec3 _12_dsa = dst.xyz * src.w;
_9_blend_hue = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_11_sda, _12_dsa), _10_alpha, _12_dsa) + dst.xyz) - _12_dsa) + src.xyz) - _11_sda, (src.w + dst.w) - _10_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_hue = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_2_sda, _3_dsa), _1_alpha, _3_dsa) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _9_blend_hue;
sk_FragColor = _0_blend_hue;
}

View File

@ -14,17 +14,17 @@ float _blend_color_luminance(float3 color) {
return dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
float3 _blend_set_color_luminance(float3 hueSatColor, float alpha, float3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
float3 result = (lum - _1_blend_color_luminance) + hueSatColor;
float3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -40,55 +40,55 @@ float3 _blend_set_color_saturation_helper(float3 minMidMax, float sat) {
return minMidMax.x < minMidMax.z ? float3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat) : float3(0.0);
}
float3 _blend_set_color_saturation(float3 hueLumColor, float3 satColor) {
float _2_blend_color_saturation;
float _6_blend_color_saturation;
{
_2_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
_6_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
}
float sat = _2_blend_color_saturation;
float sat = _6_blend_color_saturation;
if (hueLumColor.x <= hueLumColor.y) {
if (hueLumColor.y <= hueLumColor.z) {
float3 _3_blend_set_color_saturation_helper;
{
_3_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.xyz = _3_blend_set_color_saturation_helper;
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _4_blend_set_color_saturation_helper;
{
_4_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.xzy = _4_blend_set_color_saturation_helper;
} else {
float3 _5_blend_set_color_saturation_helper;
{
_5_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : float3(0.0);
}
hueLumColor.zxy = _5_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _6_blend_set_color_saturation_helper;
{
_6_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : float3(0.0);
}
hueLumColor.yxz = _6_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
float3 _7_blend_set_color_saturation_helper;
{
_7_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : float3(0.0);
_7_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.yzx = _7_blend_set_color_saturation_helper;
hueLumColor.xyz = _7_blend_set_color_saturation_helper;
} else {
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _8_blend_set_color_saturation_helper;
{
_8_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : float3(0.0);
_8_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.zyx = _8_blend_set_color_saturation_helper;
hueLumColor.xzy = _8_blend_set_color_saturation_helper;
} else {
float3 _9_blend_set_color_saturation_helper;
{
_9_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : float3(0.0);
}
hueLumColor.zxy = _9_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _10_blend_set_color_saturation_helper;
{
_10_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : float3(0.0);
}
hueLumColor.yxz = _10_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
float3 _11_blend_set_color_saturation_helper;
{
_11_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : float3(0.0);
}
hueLumColor.yzx = _11_blend_set_color_saturation_helper;
} else {
float3 _12_blend_set_color_saturation_helper;
{
_12_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : float3(0.0);
}
hueLumColor.zyx = _12_blend_set_color_saturation_helper;
}
return hueLumColor;
@ -102,14 +102,15 @@ float4 blend_hue(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _9_blend_hue;
float4 _0_blend_hue;
{
float _10_alpha = _in.dst.w * _in.src.w;
float3 _11_sda = _in.src.xyz * _in.dst.w;
float3 _12_dsa = _in.dst.xyz * _in.src.w;
_9_blend_hue = float4((((_blend_set_color_luminance(_blend_set_color_saturation(_11_sda, _12_dsa), _10_alpha, _12_dsa) + _in.dst.xyz) - _12_dsa) + _in.src.xyz) - _11_sda, (_in.src.w + _in.dst.w) - _10_alpha);
float _1_alpha = _in.dst.w * _in.src.w;
float3 _2_sda = _in.src.xyz * _in.dst.w;
float3 _3_dsa = _in.dst.xyz * _in.src.w;
_0_blend_hue = float4((((_blend_set_color_luminance(_blend_set_color_saturation(_2_sda, _3_dsa), _1_alpha, _3_dsa) + _in.dst.xyz) - _3_dsa) + _in.src.xyz) - _2_sda, (_in.src.w + _in.dst.w) - _1_alpha);
}
_out->sk_FragColor = _9_blend_hue;
_out->sk_FragColor = _0_blend_hue;
return *_out;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,55 +32,55 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
return minMidMax.x < minMidMax.z ? vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat) : vec3(0.0);
}
vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
float _2_blend_color_saturation;
float _6_blend_color_saturation;
{
_2_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
_6_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
}
float sat = _2_blend_color_saturation;
float sat = _6_blend_color_saturation;
if (hueLumColor.x <= hueLumColor.y) {
if (hueLumColor.y <= hueLumColor.z) {
vec3 _3_blend_set_color_saturation_helper;
{
_3_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xyz = _3_blend_set_color_saturation_helper;
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _4_blend_set_color_saturation_helper;
{
_4_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xzy = _4_blend_set_color_saturation_helper;
} else {
vec3 _5_blend_set_color_saturation_helper;
{
_5_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _5_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _6_blend_set_color_saturation_helper;
{
_6_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _6_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _7_blend_set_color_saturation_helper;
{
_7_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
_7_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.yzx = _7_blend_set_color_saturation_helper;
hueLumColor.xyz = _7_blend_set_color_saturation_helper;
} else {
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _8_blend_set_color_saturation_helper;
{
_8_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
_8_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.zyx = _8_blend_set_color_saturation_helper;
hueLumColor.xzy = _8_blend_set_color_saturation_helper;
} else {
vec3 _9_blend_set_color_saturation_helper;
{
_9_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _9_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _10_blend_set_color_saturation_helper;
{
_10_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _10_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _11_blend_set_color_saturation_helper;
{
_11_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yzx = _11_blend_set_color_saturation_helper;
} else {
vec3 _12_blend_set_color_saturation_helper;
{
_12_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zyx = _12_blend_set_color_saturation_helper;
}
return hueLumColor;
@ -92,13 +92,14 @@ vec4 blend_hue(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(sda, dsa), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _9_blend_hue;
vec4 _0_blend_hue;
{
float _10_alpha = dst.w * src.w;
vec3 _11_sda = src.xyz * dst.w;
vec3 _12_dsa = dst.xyz * src.w;
_9_blend_hue = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_11_sda, _12_dsa), _10_alpha, _12_dsa) + dst.xyz) - _12_dsa) + src.xyz) - _11_sda, (src.w + dst.w) - _10_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_hue = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_2_sda, _3_dsa), _1_alpha, _3_dsa) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _9_blend_hue;
sk_FragColor = _0_blend_hue;
}

View File

@ -6,27 +6,28 @@ vec4 blend_src_over(vec4 src, vec4 dst) {
return src + (1.0 - src.w) * dst;
}
vec4 blend_lighten(vec4 src, vec4 dst) {
vec4 _0_blend_src_over;
vec4 _2_blend_src_over;
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
_2_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 result = _0_blend_src_over;
vec4 result = _2_blend_src_over;
result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
return result;
}
void main() {
vec4 _1_blend_lighten;
vec4 _0_blend_lighten;
{
vec4 _3_blend_src_over;
{
_3_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 _2_result = _3_blend_src_over;
vec4 _1_result = _3_blend_src_over;
_2_result.xyz = max(_2_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_1_blend_lighten = _2_result;
_1_result.xyz = max(_1_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_0_blend_lighten = _1_result;
}
sk_FragColor = _1_blend_lighten;
sk_FragColor = _0_blend_lighten;
}

View File

@ -14,11 +14,11 @@ float4 blend_src_over(float4 src, float4 dst) {
return src + (1.0 - src.w) * dst;
}
float4 blend_lighten(float4 src, float4 dst) {
float4 _0_blend_src_over;
float4 _2_blend_src_over;
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
_2_blend_src_over = src + (1.0 - src.w) * dst;
}
float4 result = _0_blend_src_over;
float4 result = _2_blend_src_over;
result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
return result;
@ -26,18 +26,19 @@ float4 blend_lighten(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _1_blend_lighten;
float4 _0_blend_lighten;
{
float4 _3_blend_src_over;
{
_3_blend_src_over = _in.src + (1.0 - _in.src.w) * _in.dst;
}
float4 _2_result = _3_blend_src_over;
float4 _1_result = _3_blend_src_over;
_2_result.xyz = max(_2_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
_1_blend_lighten = _2_result;
_1_result.xyz = max(_1_result.xyz, (1.0 - _in.dst.w) * _in.src.xyz + _in.dst.xyz);
_0_blend_lighten = _1_result;
}
_out->sk_FragColor = _1_blend_lighten;
_out->sk_FragColor = _0_blend_lighten;
return *_out;
}

View File

@ -6,27 +6,28 @@ vec4 blend_src_over(vec4 src, vec4 dst) {
return src + (1.0 - src.w) * dst;
}
vec4 blend_lighten(vec4 src, vec4 dst) {
vec4 _0_blend_src_over;
vec4 _2_blend_src_over;
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
_2_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 result = _0_blend_src_over;
vec4 result = _2_blend_src_over;
result.xyz = max(result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
return result;
}
void main() {
vec4 _1_blend_lighten;
vec4 _0_blend_lighten;
{
vec4 _3_blend_src_over;
{
_3_blend_src_over = src + (1.0 - src.w) * dst;
}
vec4 _2_result = _3_blend_src_over;
vec4 _1_result = _3_blend_src_over;
_2_result.xyz = max(_2_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_1_blend_lighten = _2_result;
_1_result.xyz = max(_1_result.xyz, (1.0 - dst.w) * src.xyz + dst.xyz);
_0_blend_lighten = _1_result;
}
sk_FragColor = _1_blend_lighten;
sk_FragColor = _0_blend_lighten;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,13 +32,14 @@ vec4 blend_luminosity(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _2_blend_luminosity;
vec4 _0_blend_luminosity;
{
float _3_alpha = dst.w * src.w;
vec3 _4_sda = src.xyz * dst.w;
vec3 _5_dsa = dst.xyz * src.w;
_2_blend_luminosity = vec4((((_blend_set_color_luminance(_5_dsa, _3_alpha, _4_sda) + dst.xyz) - _5_dsa) + src.xyz) - _4_sda, (src.w + dst.w) - _3_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_luminosity = vec4((((_blend_set_color_luminance(_3_dsa, _1_alpha, _2_sda) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _2_blend_luminosity;
sk_FragColor = _0_blend_luminosity;
}

View File

@ -14,17 +14,17 @@ float _blend_color_luminance(float3 color) {
return dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
float3 _blend_set_color_luminance(float3 hueSatColor, float alpha, float3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
float3 result = (lum - _1_blend_color_luminance) + hueSatColor;
float3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -42,14 +42,15 @@ float4 blend_luminosity(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _2_blend_luminosity;
float4 _0_blend_luminosity;
{
float _3_alpha = _in.dst.w * _in.src.w;
float3 _4_sda = _in.src.xyz * _in.dst.w;
float3 _5_dsa = _in.dst.xyz * _in.src.w;
_2_blend_luminosity = float4((((_blend_set_color_luminance(_5_dsa, _3_alpha, _4_sda) + _in.dst.xyz) - _5_dsa) + _in.src.xyz) - _4_sda, (_in.src.w + _in.dst.w) - _3_alpha);
float _1_alpha = _in.dst.w * _in.src.w;
float3 _2_sda = _in.src.xyz * _in.dst.w;
float3 _3_dsa = _in.dst.xyz * _in.src.w;
_0_blend_luminosity = float4((((_blend_set_color_luminance(_3_dsa, _1_alpha, _2_sda) + _in.dst.xyz) - _3_dsa) + _in.src.xyz) - _2_sda, (_in.src.w + _in.dst.w) - _1_alpha);
}
_out->sk_FragColor = _2_blend_luminosity;
_out->sk_FragColor = _0_blend_luminosity;
return *_out;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,13 +32,14 @@ vec4 blend_luminosity(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(dsa, alpha, sda) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _2_blend_luminosity;
vec4 _0_blend_luminosity;
{
float _3_alpha = dst.w * src.w;
vec3 _4_sda = src.xyz * dst.w;
vec3 _5_dsa = dst.xyz * src.w;
_2_blend_luminosity = vec4((((_blend_set_color_luminance(_5_dsa, _3_alpha, _4_sda) + dst.xyz) - _5_dsa) + src.xyz) - _4_sda, (src.w + dst.w) - _3_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_luminosity = vec4((((_blend_set_color_luminance(_3_dsa, _1_alpha, _2_sda) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _2_blend_luminosity;
sk_FragColor = _0_blend_luminosity;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_modulate = src * dst;
}
sk_FragColor = _0_blend_modulate;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_modulate = _in.src * _in.dst;
}
_out->sk_FragColor = _0_blend_modulate;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_modulate = src * dst;
}
sk_FragColor = _0_blend_modulate;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_multiply = 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);
}
sk_FragColor = _0_blend_multiply;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_multiply = 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);
}
_out->sk_FragColor = _0_blend_multiply;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_multiply = 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);
}
sk_FragColor = _0_blend_multiply;
}

View File

@ -6,19 +6,19 @@ 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);
}
vec4 blend_overlay(vec4 src, vec4 dst) {
float _0_blend_overlay_component;
float _2_blend_overlay_component;
{
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_2_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _3_blend_overlay_component;
float _4_blend_overlay_component;
{
_3_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _5_blend_overlay_component;
float _6_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
_6_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 result = vec4(_0_blend_overlay_component, _3_blend_overlay_component, _5_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
vec4 result = vec4(_2_blend_overlay_component, _4_blend_overlay_component, _6_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
@ -26,27 +26,28 @@ vec4 blend_overlay(vec4 src, vec4 dst) {
return result;
}
void main() {
vec4 _1_blend_overlay;
vec4 _0_blend_overlay;
{
float _4_blend_overlay_component;
float _3_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_3_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _6_blend_overlay_component;
float _5_blend_overlay_component;
{
_6_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_5_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _7_blend_overlay_component;
{
_7_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 _2_result = vec4(_4_blend_overlay_component, _6_blend_overlay_component, _7_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
vec4 _1_result = vec4(_3_blend_overlay_component, _5_blend_overlay_component, _7_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
_2_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
_1_blend_overlay = _2_result;
_1_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
_0_blend_overlay = _1_result;
}
sk_FragColor = _1_blend_overlay;
sk_FragColor = _0_blend_overlay;
}

View File

@ -14,19 +14,19 @@ 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);
}
float4 blend_overlay(float4 src, float4 dst) {
float _0_blend_overlay_component;
float _2_blend_overlay_component;
{
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_2_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _3_blend_overlay_component;
float _4_blend_overlay_component;
{
_3_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _5_blend_overlay_component;
float _6_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
_6_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
float4 result = float4(_0_blend_overlay_component, _3_blend_overlay_component, _5_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
float4 result = float4(_2_blend_overlay_component, _4_blend_overlay_component, _6_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
@ -36,28 +36,29 @@ float4 blend_overlay(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _1_blend_overlay;
float4 _0_blend_overlay;
{
float _4_blend_overlay_component;
float _3_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * _in.dst.x <= _in.dst.w ? (2.0 * _in.src.x) * _in.dst.x : _in.src.w * _in.dst.w - (2.0 * (_in.dst.w - _in.dst.x)) * (_in.src.w - _in.src.x);
_3_blend_overlay_component = 2.0 * _in.dst.x <= _in.dst.w ? (2.0 * _in.src.x) * _in.dst.x : _in.src.w * _in.dst.w - (2.0 * (_in.dst.w - _in.dst.x)) * (_in.src.w - _in.src.x);
}
float _6_blend_overlay_component;
float _5_blend_overlay_component;
{
_6_blend_overlay_component = 2.0 * _in.dst.y <= _in.dst.w ? (2.0 * _in.src.y) * _in.dst.y : _in.src.w * _in.dst.w - (2.0 * (_in.dst.w - _in.dst.y)) * (_in.src.w - _in.src.y);
_5_blend_overlay_component = 2.0 * _in.dst.y <= _in.dst.w ? (2.0 * _in.src.y) * _in.dst.y : _in.src.w * _in.dst.w - (2.0 * (_in.dst.w - _in.dst.y)) * (_in.src.w - _in.src.y);
}
float _7_blend_overlay_component;
{
_7_blend_overlay_component = 2.0 * _in.dst.z <= _in.dst.w ? (2.0 * _in.src.z) * _in.dst.z : _in.src.w * _in.dst.w - (2.0 * (_in.dst.w - _in.dst.z)) * (_in.src.w - _in.src.z);
}
float4 _2_result = float4(_4_blend_overlay_component, _6_blend_overlay_component, _7_blend_overlay_component, _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
float4 _1_result = float4(_3_blend_overlay_component, _5_blend_overlay_component, _7_blend_overlay_component, _in.src.w + (1.0 - _in.src.w) * _in.dst.w);
_2_result.xyz = _2_result.xyz + _in.dst.xyz * (1.0 - _in.src.w) + _in.src.xyz * (1.0 - _in.dst.w);
_1_blend_overlay = _2_result;
_1_result.xyz = _1_result.xyz + _in.dst.xyz * (1.0 - _in.src.w) + _in.src.xyz * (1.0 - _in.dst.w);
_0_blend_overlay = _1_result;
}
_out->sk_FragColor = _1_blend_overlay;
_out->sk_FragColor = _0_blend_overlay;
return *_out;
}

View File

@ -6,19 +6,19 @@ 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);
}
vec4 blend_overlay(vec4 src, vec4 dst) {
float _0_blend_overlay_component;
float _2_blend_overlay_component;
{
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_2_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _3_blend_overlay_component;
float _4_blend_overlay_component;
{
_3_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _5_blend_overlay_component;
float _6_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
_6_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 result = vec4(_0_blend_overlay_component, _3_blend_overlay_component, _5_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
vec4 result = vec4(_2_blend_overlay_component, _4_blend_overlay_component, _6_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
@ -26,27 +26,28 @@ vec4 blend_overlay(vec4 src, vec4 dst) {
return result;
}
void main() {
vec4 _1_blend_overlay;
vec4 _0_blend_overlay;
{
float _4_blend_overlay_component;
float _3_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
_3_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _6_blend_overlay_component;
float _5_blend_overlay_component;
{
_6_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
_5_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _7_blend_overlay_component;
{
_7_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 _2_result = vec4(_4_blend_overlay_component, _6_blend_overlay_component, _7_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
vec4 _1_result = vec4(_3_blend_overlay_component, _5_blend_overlay_component, _7_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
_2_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
_1_blend_overlay = _2_result;
_1_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
_0_blend_overlay = _1_result;
}
sk_FragColor = _1_blend_overlay;
sk_FragColor = _0_blend_overlay;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_plus = min(src + dst, 1.0);
}
sk_FragColor = _0_blend_plus;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_plus = min(_in.src + _in.dst, 1.0);
}
_out->sk_FragColor = _0_blend_plus;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_plus = min(src + dst, 1.0);
}
sk_FragColor = _0_blend_plus;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,55 +32,55 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
return minMidMax.x < minMidMax.z ? vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat) : vec3(0.0);
}
vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
float _2_blend_color_saturation;
float _6_blend_color_saturation;
{
_2_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
_6_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
}
float sat = _2_blend_color_saturation;
float sat = _6_blend_color_saturation;
if (hueLumColor.x <= hueLumColor.y) {
if (hueLumColor.y <= hueLumColor.z) {
vec3 _3_blend_set_color_saturation_helper;
{
_3_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xyz = _3_blend_set_color_saturation_helper;
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _4_blend_set_color_saturation_helper;
{
_4_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xzy = _4_blend_set_color_saturation_helper;
} else {
vec3 _5_blend_set_color_saturation_helper;
{
_5_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _5_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _6_blend_set_color_saturation_helper;
{
_6_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _6_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _7_blend_set_color_saturation_helper;
{
_7_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
_7_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.yzx = _7_blend_set_color_saturation_helper;
hueLumColor.xyz = _7_blend_set_color_saturation_helper;
} else {
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _8_blend_set_color_saturation_helper;
{
_8_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
_8_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.zyx = _8_blend_set_color_saturation_helper;
hueLumColor.xzy = _8_blend_set_color_saturation_helper;
} else {
vec3 _9_blend_set_color_saturation_helper;
{
_9_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _9_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _10_blend_set_color_saturation_helper;
{
_10_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _10_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _11_blend_set_color_saturation_helper;
{
_11_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yzx = _11_blend_set_color_saturation_helper;
} else {
vec3 _12_blend_set_color_saturation_helper;
{
_12_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zyx = _12_blend_set_color_saturation_helper;
}
return hueLumColor;
@ -92,13 +92,14 @@ vec4 blend_saturation(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _9_blend_saturation;
vec4 _0_blend_saturation;
{
float _10_alpha = dst.w * src.w;
vec3 _11_sda = src.xyz * dst.w;
vec3 _12_dsa = dst.xyz * src.w;
_9_blend_saturation = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_12_dsa, _11_sda), _10_alpha, _12_dsa) + dst.xyz) - _12_dsa) + src.xyz) - _11_sda, (src.w + dst.w) - _10_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_saturation = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_3_dsa, _2_sda), _1_alpha, _3_dsa) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _9_blend_saturation;
sk_FragColor = _0_blend_saturation;
}

View File

@ -14,17 +14,17 @@ float _blend_color_luminance(float3 color) {
return dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
float3 _blend_set_color_luminance(float3 hueSatColor, float alpha, float3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(float3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
float3 result = (lum - _1_blend_color_luminance) + hueSatColor;
float3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -40,55 +40,55 @@ float3 _blend_set_color_saturation_helper(float3 minMidMax, float sat) {
return minMidMax.x < minMidMax.z ? float3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat) : float3(0.0);
}
float3 _blend_set_color_saturation(float3 hueLumColor, float3 satColor) {
float _2_blend_color_saturation;
float _6_blend_color_saturation;
{
_2_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
_6_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
}
float sat = _2_blend_color_saturation;
float sat = _6_blend_color_saturation;
if (hueLumColor.x <= hueLumColor.y) {
if (hueLumColor.y <= hueLumColor.z) {
float3 _3_blend_set_color_saturation_helper;
{
_3_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.xyz = _3_blend_set_color_saturation_helper;
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _4_blend_set_color_saturation_helper;
{
_4_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.xzy = _4_blend_set_color_saturation_helper;
} else {
float3 _5_blend_set_color_saturation_helper;
{
_5_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : float3(0.0);
}
hueLumColor.zxy = _5_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _6_blend_set_color_saturation_helper;
{
_6_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : float3(0.0);
}
hueLumColor.yxz = _6_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
float3 _7_blend_set_color_saturation_helper;
{
_7_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : float3(0.0);
_7_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.yzx = _7_blend_set_color_saturation_helper;
hueLumColor.xyz = _7_blend_set_color_saturation_helper;
} else {
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _8_blend_set_color_saturation_helper;
{
_8_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : float3(0.0);
_8_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : float3(0.0);
}
hueLumColor.zyx = _8_blend_set_color_saturation_helper;
hueLumColor.xzy = _8_blend_set_color_saturation_helper;
} else {
float3 _9_blend_set_color_saturation_helper;
{
_9_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : float3(0.0);
}
hueLumColor.zxy = _9_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
float3 _10_blend_set_color_saturation_helper;
{
_10_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? float3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : float3(0.0);
}
hueLumColor.yxz = _10_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
float3 _11_blend_set_color_saturation_helper;
{
_11_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : float3(0.0);
}
hueLumColor.yzx = _11_blend_set_color_saturation_helper;
} else {
float3 _12_blend_set_color_saturation_helper;
{
_12_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? float3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : float3(0.0);
}
hueLumColor.zyx = _12_blend_set_color_saturation_helper;
}
return hueLumColor;
@ -102,14 +102,15 @@ float4 blend_saturation(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _9_blend_saturation;
float4 _0_blend_saturation;
{
float _10_alpha = _in.dst.w * _in.src.w;
float3 _11_sda = _in.src.xyz * _in.dst.w;
float3 _12_dsa = _in.dst.xyz * _in.src.w;
_9_blend_saturation = float4((((_blend_set_color_luminance(_blend_set_color_saturation(_12_dsa, _11_sda), _10_alpha, _12_dsa) + _in.dst.xyz) - _12_dsa) + _in.src.xyz) - _11_sda, (_in.src.w + _in.dst.w) - _10_alpha);
float _1_alpha = _in.dst.w * _in.src.w;
float3 _2_sda = _in.src.xyz * _in.dst.w;
float3 _3_dsa = _in.dst.xyz * _in.src.w;
_0_blend_saturation = float4((((_blend_set_color_luminance(_blend_set_color_saturation(_3_dsa, _2_sda), _1_alpha, _3_dsa) + _in.dst.xyz) - _3_dsa) + _in.src.xyz) - _2_sda, (_in.src.w + _in.dst.w) - _1_alpha);
}
_out->sk_FragColor = _9_blend_saturation;
_out->sk_FragColor = _0_blend_saturation;
return *_out;
}

View File

@ -6,17 +6,17 @@ float _blend_color_luminance(vec3 color) {
return dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), color);
}
vec3 _blend_set_color_luminance(vec3 hueSatColor, float alpha, vec3 lumColor) {
float _0_blend_color_luminance;
float _4_blend_color_luminance;
{
_0_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
_4_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), lumColor);
}
float lum = _0_blend_color_luminance;
float lum = _4_blend_color_luminance;
float _1_blend_color_luminance;
float _5_blend_color_luminance;
{
_1_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
_5_blend_color_luminance = dot(vec3(0.30000001192092896, 0.5899999737739563, 0.10999999940395355), hueSatColor);
}
vec3 result = (lum - _1_blend_color_luminance) + hueSatColor;
vec3 result = (lum - _5_blend_color_luminance) + hueSatColor;
float minComp = min(min(result.x, result.y), result.z);
float maxComp = max(max(result.x, result.y), result.z);
@ -32,55 +32,55 @@ vec3 _blend_set_color_saturation_helper(vec3 minMidMax, float sat) {
return minMidMax.x < minMidMax.z ? vec3(0.0, (sat * (minMidMax.y - minMidMax.x)) / (minMidMax.z - minMidMax.x), sat) : vec3(0.0);
}
vec3 _blend_set_color_saturation(vec3 hueLumColor, vec3 satColor) {
float _2_blend_color_saturation;
float _6_blend_color_saturation;
{
_2_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
_6_blend_color_saturation = max(max(satColor.x, satColor.y), satColor.z) - min(min(satColor.x, satColor.y), satColor.z);
}
float sat = _2_blend_color_saturation;
float sat = _6_blend_color_saturation;
if (hueLumColor.x <= hueLumColor.y) {
if (hueLumColor.y <= hueLumColor.z) {
vec3 _3_blend_set_color_saturation_helper;
{
_3_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xyz = _3_blend_set_color_saturation_helper;
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _4_blend_set_color_saturation_helper;
{
_4_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.xzy = _4_blend_set_color_saturation_helper;
} else {
vec3 _5_blend_set_color_saturation_helper;
{
_5_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _5_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _6_blend_set_color_saturation_helper;
{
_6_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _6_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _7_blend_set_color_saturation_helper;
{
_7_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
_7_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.x)) / (hueLumColor.z - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.yzx = _7_blend_set_color_saturation_helper;
hueLumColor.xyz = _7_blend_set_color_saturation_helper;
} else {
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _8_blend_set_color_saturation_helper;
{
_8_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
_8_blend_set_color_saturation_helper = hueLumColor.x < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.x)) / (hueLumColor.y - hueLumColor.x), sat) : vec3(0.0);
}
hueLumColor.zyx = _8_blend_set_color_saturation_helper;
hueLumColor.xzy = _8_blend_set_color_saturation_helper;
} else {
vec3 _9_blend_set_color_saturation_helper;
{
_9_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.y ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.z)) / (hueLumColor.y - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zxy = _9_blend_set_color_saturation_helper;
}
} else if (hueLumColor.x <= hueLumColor.z) {
vec3 _10_blend_set_color_saturation_helper;
{
_10_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.z ? vec3(0.0, (sat * (hueLumColor.x - hueLumColor.y)) / (hueLumColor.z - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yxz = _10_blend_set_color_saturation_helper;
} else if (hueLumColor.y <= hueLumColor.z) {
vec3 _11_blend_set_color_saturation_helper;
{
_11_blend_set_color_saturation_helper = hueLumColor.y < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.z - hueLumColor.y)) / (hueLumColor.x - hueLumColor.y), sat) : vec3(0.0);
}
hueLumColor.yzx = _11_blend_set_color_saturation_helper;
} else {
vec3 _12_blend_set_color_saturation_helper;
{
_12_blend_set_color_saturation_helper = hueLumColor.z < hueLumColor.x ? vec3(0.0, (sat * (hueLumColor.y - hueLumColor.z)) / (hueLumColor.x - hueLumColor.z), sat) : vec3(0.0);
}
hueLumColor.zyx = _12_blend_set_color_saturation_helper;
}
return hueLumColor;
@ -92,13 +92,14 @@ vec4 blend_saturation(vec4 src, vec4 dst) {
return vec4((((_blend_set_color_luminance(_blend_set_color_saturation(dsa, sda), alpha, dsa) + dst.xyz) - dsa) + src.xyz) - sda, (src.w + dst.w) - alpha);
}
void main() {
vec4 _9_blend_saturation;
vec4 _0_blend_saturation;
{
float _10_alpha = dst.w * src.w;
vec3 _11_sda = src.xyz * dst.w;
vec3 _12_dsa = dst.xyz * src.w;
_9_blend_saturation = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_12_dsa, _11_sda), _10_alpha, _12_dsa) + dst.xyz) - _12_dsa) + src.xyz) - _11_sda, (src.w + dst.w) - _10_alpha);
float _1_alpha = dst.w * src.w;
vec3 _2_sda = src.xyz * dst.w;
vec3 _3_dsa = dst.xyz * src.w;
_0_blend_saturation = vec4((((_blend_set_color_luminance(_blend_set_color_saturation(_3_dsa, _2_sda), _1_alpha, _3_dsa) + dst.xyz) - _3_dsa) + src.xyz) - _2_sda, (src.w + dst.w) - _1_alpha);
}
sk_FragColor = _9_blend_saturation;
sk_FragColor = _0_blend_saturation;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_screen = src + (1.0 - src) * dst;
}
sk_FragColor = _0_blend_screen;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_screen = _in.src + (1.0 - _in.src) * _in.dst;
}
_out->sk_FragColor = _0_blend_screen;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_screen = src + (1.0 - src) * dst;
}
sk_FragColor = _0_blend_screen;
}

View File

@ -7,24 +7,24 @@ float _guarded_divide(float n, float d) {
}
float _soft_light_component(vec2 s, vec2 d) {
if (2.0 * s.x <= s.y) {
float _0_guarded_divide;
float _1_n = (d.x * d.x) * (s.y - 2.0 * s.x);
float _1_guarded_divide;
float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
{
_0_guarded_divide = _1_n / d.y;
_1_guarded_divide = _2_n / d.y;
}
return (_0_guarded_divide + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0);
return (_1_guarded_divide + (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;
float DaSqd = d.y * d.y;
float DaCub = DaSqd * d.y;
float _2_guarded_divide;
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;
float _3_guarded_divide;
float _4_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;
{
_2_guarded_divide = _3_n / DaSqd;
_3_guarded_divide = _4_n / DaSqd;
}
return _2_guarded_divide;
return _3_guarded_divide;
} 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;
@ -34,10 +34,11 @@ vec4 blend_soft_light(vec4 src, vec4 dst) {
return 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);
}
void main() {
vec4 _4_blend_soft_light;
vec4 _0_blend_soft_light;
{
_4_blend_soft_light = 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);
_0_blend_soft_light = 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);
}
sk_FragColor = _4_blend_soft_light;
sk_FragColor = _0_blend_soft_light;
}

View File

@ -15,24 +15,24 @@ float _guarded_divide(float n, float d) {
}
float _soft_light_component(float2 s, float2 d) {
if (2.0 * s.x <= s.y) {
float _0_guarded_divide;
float _1_n = (d.x * d.x) * (s.y - 2.0 * s.x);
float _1_guarded_divide;
float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
{
_0_guarded_divide = _1_n / d.y;
_1_guarded_divide = _2_n / d.y;
}
return (_0_guarded_divide + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0);
return (_1_guarded_divide + (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;
float DaSqd = d.y * d.y;
float DaCub = DaSqd * d.y;
float _2_guarded_divide;
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;
float _3_guarded_divide;
float _4_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;
{
_2_guarded_divide = _3_n / DaSqd;
_3_guarded_divide = _4_n / DaSqd;
}
return _2_guarded_divide;
return _3_guarded_divide;
} 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;
@ -44,11 +44,12 @@ float4 blend_soft_light(float4 src, float4 dst) {
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _outputStruct;
thread Outputs* _out = &_outputStruct;
float4 _4_blend_soft_light;
float4 _0_blend_soft_light;
{
_4_blend_soft_light = _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);
_0_blend_soft_light = _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);
}
_out->sk_FragColor = _4_blend_soft_light;
_out->sk_FragColor = _0_blend_soft_light;
return *_out;
}

View File

@ -7,24 +7,24 @@ float _guarded_divide(float n, float d) {
}
float _soft_light_component(vec2 s, vec2 d) {
if (2.0 * s.x <= s.y) {
float _0_guarded_divide;
float _1_n = (d.x * d.x) * (s.y - 2.0 * s.x);
float _1_guarded_divide;
float _2_n = (d.x * d.x) * (s.y - 2.0 * s.x);
{
_0_guarded_divide = _1_n / d.y;
_1_guarded_divide = _2_n / d.y;
}
return (_0_guarded_divide + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0);
return (_1_guarded_divide + (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;
float DaSqd = d.y * d.y;
float DaCub = DaSqd * d.y;
float _2_guarded_divide;
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;
float _3_guarded_divide;
float _4_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;
{
_2_guarded_divide = _3_n / DaSqd;
_3_guarded_divide = _4_n / DaSqd;
}
return _2_guarded_divide;
return _3_guarded_divide;
} 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;
@ -34,10 +34,11 @@ vec4 blend_soft_light(vec4 src, vec4 dst) {
return 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);
}
void main() {
vec4 _4_blend_soft_light;
vec4 _0_blend_soft_light;
{
_4_blend_soft_light = 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);
_0_blend_soft_light = 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);
}
sk_FragColor = _4_blend_soft_light;
sk_FragColor = _0_blend_soft_light;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src = src;
}
sk_FragColor = _0_blend_src;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_src = _in.src;
}
_out->sk_FragColor = _0_blend_src;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_atop = dst.w * src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_src_atop;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_src_atop = _in.dst.w * _in.src + (1.0 - _in.src.w) * _in.dst;
}
_out->sk_FragColor = _0_blend_src_atop;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_atop = dst.w * src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_src_atop;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_in = src * dst.w;
}
sk_FragColor = _0_blend_src_in;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_src_in = _in.src * _in.dst.w;
}
_out->sk_FragColor = _0_blend_src_in;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_in = src * dst.w;
}
sk_FragColor = _0_blend_src_in;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_out = (1.0 - dst.w) * src;
}
sk_FragColor = _0_blend_src_out;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_src_out = (1.0 - _in.dst.w) * _in.src;
}
_out->sk_FragColor = _0_blend_src_out;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_out = (1.0 - dst.w) * src;
}
sk_FragColor = _0_blend_src_out;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_src_over;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_src_over = _in.src + (1.0 - _in.src.w) * _in.dst;
}
_out->sk_FragColor = _0_blend_src_over;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src_over = src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_src_over;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_src = src;
}
sk_FragColor = _0_blend_src;
}

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_xor = (1.0 - dst.w) * src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_xor;
}

View File

@ -20,6 +20,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front
{
_0_blend_xor = (1.0 - _in.dst.w) * _in.src + (1.0 - _in.src.w) * _in.dst;
}
_out->sk_FragColor = _0_blend_xor;
return *_out;

View File

@ -10,6 +10,7 @@ void main() {
{
_0_blend_xor = (1.0 - dst.w) * src + (1.0 - src.w) * dst;
}
sk_FragColor = _0_blend_xor;
}

View File

@ -25,6 +25,7 @@ R"SkSL(half4 _0_flip;
{
_0_flip = %s.wzyx;
}
%s = _0_flip;
)SkSL"

View File

@ -7,6 +7,7 @@ void main() {
{
_0_adjust = sk_FragColor + vec4(0.125);
}
sk_FragColor = _0_adjust;
} while (sk_FragColor.x < 0.5);
}

View File

@ -7,6 +7,7 @@ void main() {
{
_0_adjust = sk_FragColor + vec4(0.125);
}
sk_FragColor = _0_adjust;
}
}

View File

@ -7,7 +7,7 @@ vec4 grow(vec4 v) {
return v + vec4(0.125);
}
void main() {
for (sk_FragColor = vec4(0.0625);shouldLoop(sk_FragColor); sk_FragColor = grow(sk_FragColor)) {
for (sk_FragColor = vec4(0.0625);
shouldLoop(sk_FragColor); sk_FragColor = grow(sk_FragColor)) {
}
}

View File

@ -10,6 +10,7 @@ void main() {
}
_0_loopy = _1_result;
}
sk_FragColor = _0_loopy;
}

View File

@ -8,6 +8,7 @@ void main() {
{
_0_ifBody = color + vec4(0.125);
}
c = _0_ifBody;
}
sk_FragColor = c;

View File

@ -9,6 +9,7 @@ void main() {
{
_0_elseBody = color + vec4(0.125);
}
c = _0_elseBody;
}
sk_FragColor = c;

View File

@ -8,6 +8,7 @@ void main() {
_1_c *= 0.5;
if (_1_c.x > 0.0) _0_branchy = _1_c.xxxx; else if (_1_c.y > 0.0) _0_branchy = _1_c.yyyy; else if (_1_c.z > 0.0) _0_branchy = _1_c.zzzz; else _0_branchy = _1_c.wwww;
}
vec4 _2_branchyAndBlocky;
{
{
@ -29,7 +30,7 @@ void main() {
}
}
}
sk_FragColor = _0_branchy * _2_branchyAndBlocky;
}

View File

@ -6,6 +6,7 @@ void main() {
{
_0_ifTest = color.x >= 0.5;
}
if (_0_ifTest) sk_FragColor = vec4(1.0); else sk_FragColor = vec4(0.5);
}

View File

@ -6,6 +6,7 @@ void main() {
{
if (color.z == color.w) _0_branchy = color.yyyy; else _0_branchy = color.zzzz;
}
sk_FragColor = _0_branchy;
}

View File

@ -6,5 +6,6 @@ void main() {
x *= 2.0;
}
sk_FragColor.x = x;
}

Some files were not shown because too many files have changed in this diff Show More