2021-02-01 16:52:10 +00:00
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
|
|
|
half4 main() {
|
2020-09-17 22:20:26 +00:00
|
|
|
const float4 a = float4(0);
|
|
|
|
const float4 b = float4(1);
|
2021-02-25 16:25:30 +00:00
|
|
|
// This is a constant-expression in GLSL, but not in SkSL (yet).
|
|
|
|
// We can't declare this const, and we can't eliminate it. skbug.com/10835
|
|
|
|
/*const*/ float4 c = abs(b);
|
2021-02-09 23:29:40 +00:00
|
|
|
if (a == b || b != c) {
|
2021-02-01 16:52:10 +00:00
|
|
|
return colorRed;
|
|
|
|
} else {
|
|
|
|
return colorGreen;
|
|
|
|
}
|
2020-09-17 22:20:26 +00:00
|
|
|
}
|