You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
391 B
15 lines
391 B
7 months ago
|
uniform half4 colorGreen, colorRed;
|
||
|
|
||
|
half4 main(float2 coords) {
|
||
|
const float4 a = float4(0);
|
||
|
const float4 b = float4(1);
|
||
|
// 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);
|
||
|
if (a == b || b != c) {
|
||
|
return colorRed;
|
||
|
} else {
|
||
|
return colorGreen;
|
||
|
}
|
||
|
}
|