skia2/tests/sksl/shared/UnaryPositiveNegative.glsl
John Stiles 0ac6c15075 Reduce self-assignment expressions (x = x) into just x.
Change-Id: I44356aa781f208f4941dbeb617a30318e36c1081
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 20:00:05 +00:00

11 lines
205 B
GLSL

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