| 1 |
struct InstanceData |
| 2 |
{ |
| 3 |
column_major float4x4 MATRIX_MVP; |
| 4 |
float4 Color; |
| 5 |
}; |
| 6 |
|
| 7 |
cbuffer gInstanceData : register(b0) |
| 8 |
{ |
| 9 |
InstanceData gInstanceData_1_data[32] : packoffset(c0); |
| 10 |
}; |
| 11 |
|
| 12 |
|
| 13 |
static float4 gl_Position; |
| 14 |
static int gl_InstanceIndex; |
| 15 |
static float3 PosL; |
| 16 |
static float4 _entryPointOutput_Color; |
| 17 |
|
| 18 |
struct SPIRV_Cross_Input |
| 19 |
{ |
| 20 |
float3 PosL : TEXCOORD0; |
| 21 |
uint gl_InstanceIndex : SV_InstanceID; |
| 22 |
}; |
| 23 |
|
| 24 |
struct SPIRV_Cross_Output |
| 25 |
{ |
| 26 |
float4 _entryPointOutput_Color : TEXCOORD0; |
| 27 |
float4 gl_Position : SV_Position; |
| 28 |
}; |
| 29 |
|
| 30 |
void vert_main() |
| 31 |
{ |
| 32 |
gl_Position = mul(float4(PosL, 1.0f), gInstanceData_1_data[uint(gl_InstanceIndex)].MATRIX_MVP); |
| 33 |
_entryPointOutput_Color = gInstanceData_1_data[uint(gl_InstanceIndex)].Color; |
| 34 |
} |
| 35 |
|
| 36 |
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) |
| 37 |
{ |
| 38 |
gl_InstanceIndex = int(stage_input.gl_InstanceIndex); |
| 39 |
PosL = stage_input.PosL; |
| 40 |
vert_main(); |
| 41 |
SPIRV_Cross_Output stage_output; |
| 42 |
stage_output.gl_Position = gl_Position; |
| 43 |
stage_output._entryPointOutput_Color = _entryPointOutput_Color; |
| 44 |
return stage_output; |
| 45 |
} |