blob: 33cab7007e646fa59d7ff8ca8d52413b3412af08 [file] [log] [blame]
uniform half4 colorGreen, colorRed;
struct S {
float a, b, c;
};
float sumStruct(S s) {
float sum = s.a;
sum += s.b;
sum += s.c;
return sum;
}
float sumStructMutating(S s) {
s.a += s.b;
s.a += s.c;
return s.a;
}
half4 main(float2 coords) {
S s = S(1, 2, 3);
return sumStruct(s) == sumStructMutating(s) ? colorGreen : colorRed;
}