mirror of
https://github.com/libretro/RetroArch
synced 2025-02-16 03:40:12 +00:00
- https://github.com/KhronosGroup/SPIRV-Cross/commit/ 66a407285e36a0f772e3209cb86ded6e3d900f6a
29 lines
647 B
GLSL
29 lines
647 B
GLSL
static float4 gl_Position;
|
|
static int gl_VertexIndex;
|
|
static int gl_InstanceIndex;
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
uint gl_VertexIndex : SV_VertexID;
|
|
uint gl_InstanceIndex : SV_InstanceID;
|
|
};
|
|
|
|
struct SPIRV_Cross_Output
|
|
{
|
|
float4 gl_Position : SV_Position;
|
|
};
|
|
|
|
void vert_main()
|
|
{
|
|
gl_Position = float(gl_VertexIndex + gl_InstanceIndex).xxxx;
|
|
}
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
gl_VertexIndex = int(stage_input.gl_VertexIndex);
|
|
gl_InstanceIndex = int(stage_input.gl_InstanceIndex);
|
|
vert_main();
|
|
SPIRV_Cross_Output stage_output;
|
|
stage_output.gl_Position = gl_Position;
|
|
return stage_output;
|
|
}
|