skia2/resources/sksl/shared/OperatorsES3.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

29 lines
658 B
Plaintext

uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
float x = 1, y = 2;
int z = 3;
x = x - x + y * x * x * (y - x);
y = x / y / x;
z = (z / 2 % 3 << 4) >> 2 << 1;
bool b = (x > 4) == x < 2 || 2 >= sqrt(2) && y <= x;
bool c = sqrt(2) > 2;
bool d = b ^^ c;
bool e = b && c;
bool f = b || c;
x += 12;
x -= 12;
x *= y /= 10;
z |= 0;
z &= -1;
z ^= 0;
z >>= 2;
z <<= 4;
z %= 5;
x = (float2(sqrt(1)), 6);
y = (float(b) * float(c) * float(d) * float(e) * float(f), 6.0);
z = (float2(sqrt(1)), 6);
return (x == 6 && y == 6 && z == 6) ? colorGreen : colorRed;
}