| 1 |
struct Foo |
| 2 |
{ |
| 3 |
int a; |
| 4 |
}; |
| 5 |
|
| 6 |
static float4 vColor; |
| 7 |
static float4 FragColor; |
| 8 |
|
| 9 |
struct SPIRV_Cross_Input |
| 10 |
{ |
| 11 |
float4 vColor : TEXCOORD0; |
| 12 |
}; |
| 13 |
|
| 14 |
struct SPIRV_Cross_Output |
| 15 |
{ |
| 16 |
float4 FragColor : SV_Target0; |
| 17 |
}; |
| 18 |
|
| 19 |
static int uninit_int = 0; |
| 20 |
static int4 uninit_vector = int4(0, 0, 0, 0); |
| 21 |
static float4x4 uninit_matrix = float4x4(0.0f.xxxx, 0.0f.xxxx, 0.0f.xxxx, 0.0f.xxxx); |
| 22 |
static Foo uninit_foo = { 0 }; |
| 23 |
|
| 24 |
void frag_main() |
| 25 |
{ |
| 26 |
int _39 = 0; |
| 27 |
if (vColor.x > 10.0f) |
| 28 |
{ |
| 29 |
_39 = 10; |
| 30 |
} |
| 31 |
else |
| 32 |
{ |
| 33 |
_39 = 20; |
| 34 |
} |
| 35 |
FragColor = vColor; |
| 36 |
} |
| 37 |
|
| 38 |
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) |
| 39 |
{ |
| 40 |
vColor = stage_input.vColor; |
| 41 |
frag_main(); |
| 42 |
SPIRV_Cross_Output stage_output; |
| 43 |
stage_output.FragColor = FragColor; |
| 44 |
return stage_output; |
| 45 |
} |