/*#pragma settings NoInline*/ | |
uniform half4 colorGreen, colorRed; | |
float foo(in const float2 v) { | |
return v.x * v.y; | |
} | |
void bar(inout float x) { | |
float y[2]; | |
y[0] = x; | |
y[1] = x * 2; | |
x = foo(float2(y[0], y[1])); | |
} | |
half4 main(float2 coords) { | |
float x = 10; | |
bar(x); | |
return x == 200 ? colorGreen : colorRed; | |
} |