2018-02-02 09:10:17 +00:00
|
|
|
struct Foo
|
|
|
|
{
|
|
|
|
float a;
|
|
|
|
float b;
|
|
|
|
};
|
|
|
|
|
|
|
|
static const float _16[4] = { 1.0f, 4.0f, 3.0f, 2.0f };
|
|
|
|
static const Foo _24 = { 10.0f, 20.0f };
|
|
|
|
static const Foo _27 = { 30.0f, 40.0f };
|
|
|
|
static const Foo _28[2] = { { 10.0f, 20.0f }, { 30.0f, 40.0f } };
|
|
|
|
|
|
|
|
static float4 FragColor;
|
|
|
|
static int _line;
|
|
|
|
|
|
|
|
struct SPIRV_Cross_Input
|
|
|
|
{
|
|
|
|
nointerpolation int _line : TEXCOORD0;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SPIRV_Cross_Output
|
|
|
|
{
|
|
|
|
float4 FragColor : SV_Target0;
|
|
|
|
};
|
|
|
|
|
|
|
|
void frag_main()
|
|
|
|
{
|
2018-09-27 09:10:22 +00:00
|
|
|
FragColor = _16[_line].xxxx;
|
2019-01-10 08:49:33 +00:00
|
|
|
FragColor += (_28[_line].a * _28[1 - _line].a).xxxx;
|
2018-02-02 09:10:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
|
|
{
|
|
|
|
_line = stage_input._line;
|
|
|
|
frag_main();
|
|
|
|
SPIRV_Cross_Output stage_output;
|
|
|
|
stage_output.FragColor = FragColor;
|
|
|
|
return stage_output;
|
|
|
|
}
|