2017-10-10 15:32:26 +00:00
|
|
|
cbuffer _16
|
2017-01-26 12:22:52 +00:00
|
|
|
{
|
2018-01-09 09:40:34 +00:00
|
|
|
row_major float4x4 _16_uMVP : packoffset(c0);
|
2017-01-26 12:22:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static float4 gl_Position;
|
|
|
|
static float4 aVertex;
|
|
|
|
static float3 vNormal;
|
|
|
|
static float3 aNormal;
|
|
|
|
|
2017-03-06 15:50:15 +00:00
|
|
|
struct SPIRV_Cross_Input
|
2017-01-26 12:22:52 +00:00
|
|
|
{
|
2017-06-21 07:39:08 +00:00
|
|
|
float4 aVertex : TEXCOORD0;
|
|
|
|
float3 aNormal : TEXCOORD1;
|
2017-01-26 12:22:52 +00:00
|
|
|
};
|
|
|
|
|
2017-03-06 15:50:15 +00:00
|
|
|
struct SPIRV_Cross_Output
|
2017-01-26 12:22:52 +00:00
|
|
|
{
|
2017-03-07 12:27:04 +00:00
|
|
|
float3 vNormal : TEXCOORD0;
|
2017-03-24 13:40:13 +00:00
|
|
|
float4 gl_Position : SV_Position;
|
2017-01-26 12:22:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void vert_main()
|
|
|
|
{
|
2018-01-09 09:40:34 +00:00
|
|
|
gl_Position = mul(aVertex, _16_uMVP);
|
2017-01-26 12:22:52 +00:00
|
|
|
vNormal = aNormal;
|
|
|
|
}
|
|
|
|
|
2017-03-06 15:50:15 +00:00
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
2017-01-26 12:22:52 +00:00
|
|
|
{
|
2017-03-06 15:50:15 +00:00
|
|
|
aVertex = stage_input.aVertex;
|
|
|
|
aNormal = stage_input.aNormal;
|
2017-01-26 12:22:52 +00:00
|
|
|
vert_main();
|
2017-03-06 15:50:15 +00:00
|
|
|
SPIRV_Cross_Output stage_output;
|
|
|
|
stage_output.gl_Position = gl_Position;
|
|
|
|
stage_output.vNormal = vNormal;
|
|
|
|
return stage_output;
|
2017-01-26 12:22:52 +00:00
|
|
|
}
|