xref: /aosp_15_r20/external/skia/resources/sksl/intrinsics/All.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 colorGreen, colorRed;
2
3half4 main(float2 coords) {
4    bool4 inputVal = bool4(colorRed.rrba);   // TTFT
5    bool4 expected = bool4(colorRed.rgbb);   // TFFF
6
7    const bool4 constVal = bool4(true, true, false, true);
8    return (all(inputVal.xy)   == expected.x &&
9            all(inputVal.xyz)  == expected.y &&
10            all(inputVal.xyzw) == expected.z &&
11            all(constVal.xy)   == expected.x &&
12            all(constVal.xyz)  == expected.y &&
13            all(constVal.xyzw) == expected.z) ? colorGreen : colorRed;
14}
15