skia2/resources/sksl/shared/UnaryPositiveNegative.sksl

9 lines
183 B
Plaintext
Raw Normal View History

uniform half4 colorWhite, colorGreen, colorRed;
half4 main(float2 coords) {
half2 x = colorWhite.rg;
x = +x;
x = -x;
return x == half2(-1) ? colorGreen : colorRed;
}