2020-12-02 16:53:51 +00:00
|
|
|
/*#pragma settings NoInline*/
|
|
|
|
|
2021-02-03 22:44:47 +00:00
|
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
|
2021-10-11 20:49:39 +00:00
|
|
|
float foo(in const float2 v) {
|
2021-02-03 22:44:47 +00:00
|
|
|
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-04-21 18:27:08 +00:00
|
|
|
half4 main(float2 coords) {
|
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
|
|
|
}
|