skia2/resources/sksl/inliner/TernaryResultsCannotBeInlined.sksl

14 lines
241 B
Plaintext
Raw Normal View History

uniform half4 colorGreen, colorRed;
inline half4 trueSide(half4 v) {
return v.r1ba;
}
inline half4 falseSide(half4 v) {
return v.r0ba;
}
half4 main() {
return bool(colorGreen.g) ? trueSide(colorGreen) : falseSide(colorRed);
}