skia2/resources/sksl/shared/ConstVariableComparison.sksl

13 lines
247 B
Plaintext
Raw Normal View History

uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
const float4 a = float4(0);
const float4 b = float4(1);
const float4 c = abs(b * 1);
if (a == b || b != c) {
return colorRed;
} else {
return colorGreen;
}
}