2020-12-02 16:53:51 +00:00
|
|
|
/*#pragma settings NoInline*/
|
|
|
|
|
2021-02-03 22:44:47 +00:00
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
|
|
|
float foo(float2 v) {
|
|
|
|
return v.x * v.y;
|
2020-09-14 21:30:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void bar(inout float x) {
|
2021-02-03 22:44:47 +00:00
|
|
|
float y[2];
|
2020-09-14 21:30:13 +00:00
|
|
|
y[0] = x;
|
|
|
|
y[1] = x * 2;
|
2021-02-03 22:44:47 +00:00
|
|
|
x = foo(float2(y[0], y[1]));
|
2020-09-14 21:30:13 +00:00
|
|
|
}
|
|
|
|
|
2021-02-03 22:44:47 +00:00
|
|
|
half4 main() {
|
2020-09-14 21:30:13 +00:00
|
|
|
float x = 10;
|
|
|
|
bar(x);
|
2021-02-03 22:44:47 +00:00
|
|
|
return x == 200 ? colorGreen : colorRed;
|
2020-09-14 21:30:13 +00:00
|
|
|
}
|