skia2/resources/sksl/shared/SwizzleBoolConstants.sksl
Brian Osman 169c8903be Reland "Add coords parameter to all .sksl test files used as runtime effects"
This is a reland of 22dcb5fd7e

Original change's description:
> Add coords parameter to all .sksl test files used as runtime effects
>
> Convert to use the newer MakeForShader factory, which requires this.
>
> Change-Id: Ifaf6054054027c78f3f3fe15596e435e0f79b877
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399336
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

Bug: skia:11919
Change-Id: I5f745c54b2bc3712f2281db6e067345903e81931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401836
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-27 20:47:31 +00:00

35 lines
878 B
Plaintext

uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
bool4 v = bool4(colorGreen.g);
bool4 result;
result = bool4(v.x, true, true, true);
result = bool4(v.xy, false, true);
result = bool4(v.x1, true, false);
result = bool4(v.0y, true, true);
result = bool4(v.xyz, true);
result = bool4(v.xy1, true);
result = bool4(v.x0z, true);
result = bool4(v.x10, false);
result = bool4(v.1yz, false);
result = bool4(v.0y1, false);
result = bool4(v.11z, false);
result = v.xyzw;
result = v.xyz1;
result = v.xy0w;
result = v.xy10;
result = v.x1zw;
result = v.x0z1;
result = v.x11w;
result = v.x101;
result = v.1yzw;
result = v.0yz1;
result = v.0y1w;
result = v.1y11;
result = v.00zw;
result = v.00z1;
result = v.011w;
return any(result) ? colorGreen : colorRed;
}