android13/external/skia/resources/sksl/inliner/SwitchWithCastCanBeInlined....

15 lines
256 B
Plaintext

uniform half4 color;
inline half4 switchy(half4 c) {
half4 result;
switch (int(c.x)) {
case 1: result = c.yyyy; break;
default: result = c.zzzz; break;
}
return result;
}
void main() {
sk_FragColor = switchy(color);
}