skia2/tests/sksl/shared/UnaryPositiveNegative.glsl
John Stiles ecd7c2278f Migrate the last SkSL tests in shared/ to dm.
The leftover tests in shared/ are not easily testable as Runtime
Effects; they do things that ES2 doesn't support or use a feature not
exposed directly by Runtime Effects.

Change-Id: I7ebe170cf713c4a0d2dbef333c1fcbac2410c67f
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367059
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-08 21:37:48 +00:00

12 lines
216 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorWhite;
uniform vec4 colorGreen;
uniform vec4 colorRed;
vec4 main() {
vec2 x = colorWhite.xy;
x = x;
x = -x;
return x == vec2(-1.0) ? colorGreen : colorRed;
}