2017-03-07 12:51:33 +00:00
|
|
|
static float4 gl_FragCoord;
|
|
|
|
static float gl_FragDepth;
|
|
|
|
static float4 FragColor;
|
|
|
|
static float4 vColor;
|
|
|
|
|
|
|
|
struct SPIRV_Cross_Input
|
|
|
|
{
|
|
|
|
float4 vColor : TEXCOORD0;
|
2017-03-24 13:40:13 +00:00
|
|
|
float4 gl_FragCoord : SV_Position;
|
2017-03-07 12:51:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SPIRV_Cross_Output
|
|
|
|
{
|
2017-03-07 12:56:03 +00:00
|
|
|
float4 FragColor : SV_Target0;
|
2017-03-24 13:40:13 +00:00
|
|
|
float gl_FragDepth : SV_Depth;
|
2017-03-07 12:51:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void frag_main()
|
|
|
|
{
|
|
|
|
FragColor = gl_FragCoord + vColor;
|
|
|
|
gl_FragDepth = 0.5f;
|
|
|
|
}
|
|
|
|
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
|
|
{
|
2017-03-07 12:56:03 +00:00
|
|
|
gl_FragCoord = stage_input.gl_FragCoord;
|
2017-03-07 12:51:33 +00:00
|
|
|
vColor = stage_input.vColor;
|
|
|
|
frag_main();
|
|
|
|
SPIRV_Cross_Output stage_output;
|
|
|
|
stage_output.gl_FragDepth = gl_FragDepth;
|
|
|
|
stage_output.FragColor = FragColor;
|
|
|
|
return stage_output;
|
|
|
|
}
|