| 1 |
static float FragColor; |
| 2 |
static float vColor; |
| 3 |
|
| 4 |
struct SPIRV_Cross_Input |
| 5 |
{ |
| 6 |
float vColor : TEXCOORD0; |
| 7 |
}; |
| 8 |
|
| 9 |
struct SPIRV_Cross_Output |
| 10 |
{ |
| 11 |
float FragColor : SV_Target0; |
| 12 |
}; |
| 13 |
|
| 14 |
#line 8 "test.frag" |
| 15 |
void frag_main() |
| 16 |
{ |
| 17 |
#line 8 "test.frag" |
| 18 |
FragColor = 1.0f; |
| 19 |
#line 9 "test.frag" |
| 20 |
FragColor = 2.0f; |
| 21 |
#line 10 "test.frag" |
| 22 |
if (vColor < 0.0f) |
| 23 |
{ |
| 24 |
#line 12 "test.frag" |
| 25 |
FragColor = 3.0f; |
| 26 |
} |
| 27 |
else |
| 28 |
{ |
| 29 |
#line 16 "test.frag" |
| 30 |
FragColor = 4.0f; |
| 31 |
} |
| 32 |
for (int _127 = 0; float(_127) < (40.0f + vColor); ) |
| 33 |
{ |
| 34 |
#line 21 "test.frag" |
| 35 |
FragColor += 0.20000000298023223876953125f; |
| 36 |
#line 22 "test.frag" |
| 37 |
FragColor += 0.300000011920928955078125f; |
| 38 |
_127 += (int(vColor) + 5); |
| 39 |
continue; |
| 40 |
} |
| 41 |
switch (int(vColor)) |
| 42 |
{ |
| 43 |
case 0: |
| 44 |
{ |
| 45 |
#line 28 "test.frag" |
| 46 |
FragColor += 0.20000000298023223876953125f; |
| 47 |
#line 29 "test.frag" |
| 48 |
break; |
| 49 |
} |
| 50 |
case 1: |
| 51 |
{ |
| 52 |
#line 32 "test.frag" |
| 53 |
FragColor += 0.4000000059604644775390625f; |
| 54 |
#line 33 "test.frag" |
| 55 |
break; |
| 56 |
} |
| 57 |
default: |
| 58 |
{ |
| 59 |
#line 36 "test.frag" |
| 60 |
FragColor += 0.800000011920928955078125f; |
| 61 |
#line 37 "test.frag" |
| 62 |
break; |
| 63 |
} |
| 64 |
} |
| 65 |
for (;;) |
| 66 |
{ |
| 67 |
FragColor += (10.0f + vColor); |
| 68 |
#line 43 "test.frag" |
| 69 |
if (FragColor < 100.0f) |
| 70 |
{ |
| 71 |
} |
| 72 |
else |
| 73 |
{ |
| 74 |
break; |
| 75 |
} |
| 76 |
} |
| 77 |
} |
| 78 |
|
| 79 |
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) |
| 80 |
{ |
| 81 |
vColor = stage_input.vColor; |
| 82 |
frag_main(); |
| 83 |
SPIRV_Cross_Output stage_output; |
| 84 |
stage_output.FragColor = FragColor; |
| 85 |
return stage_output; |
| 86 |
} |