169c8903be
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>
19 lines
846 B
Plaintext
19 lines
846 B
Plaintext
uniform half4 testInputs;
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
half4 main(float2 coords) {
|
|
int4 intValues = int4(testInputs * 100);
|
|
int4 intGreen = int4(colorGreen * 100);
|
|
|
|
int4 expectedA = int4(50, 50, 75, 225);
|
|
int4 expectedB = int4(0, 100, 75, 225);
|
|
return (max(intValues.x, 50) == expectedA.x &&
|
|
max(intValues.xy, 50) == expectedA.xy &&
|
|
max(intValues.xyz, 50) == expectedA.xyz &&
|
|
max(intValues.xyzw, 50) == expectedA.xyzw &&
|
|
max(intValues.x, intGreen.x) == expectedB.x &&
|
|
max(intValues.xy, intGreen.xy) == expectedB.xy &&
|
|
max(intValues.xyz, intGreen.xyz) == expectedB.xyz &&
|
|
max(intValues.xyzw, intGreen.xyzw) == expectedB.xyzw) ? colorGreen : colorRed;
|
|
}
|