| 1 |
cbuffer UBO : register(b0) |
| 2 |
{ |
| 3 |
row_major float4x4 _16_uMVP : packoffset(c0); |
| 4 |
}; |
| 5 |
|
| 6 |
|
| 7 |
static float4 gl_Position; |
| 8 |
static float4 aVertex; |
| 9 |
static float3 vNormal; |
| 10 |
static float3 aNormal; |
| 11 |
|
| 12 |
struct SPIRV_Cross_Input |
| 13 |
{ |
| 14 |
float4 aVertex : TEXCOORD0; |
| 15 |
float3 aNormal : TEXCOORD1; |
| 16 |
}; |
| 17 |
|
| 18 |
struct SPIRV_Cross_Output |
| 19 |
{ |
| 20 |
float3 vNormal : TEXCOORD0; |
| 21 |
float4 gl_Position : SV_Position; |
| 22 |
}; |
| 23 |
|
| 24 |
void vert_main() |
| 25 |
{ |
| 26 |
gl_Position = mul(aVertex, _16_uMVP); |
| 27 |
vNormal = aNormal; |
| 28 |
} |
| 29 |
|
| 30 |
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) |
| 31 |
{ |
| 32 |
aVertex = stage_input.aVertex; |
| 33 |
aNormal = stage_input.aNormal; |
| 34 |
vert_main(); |
| 35 |
SPIRV_Cross_Output stage_output; |
| 36 |
stage_output.gl_Position = gl_Position; |
| 37 |
stage_output.vNormal = vNormal; |
| 38 |
return stage_output; |
| 39 |
} |