Hi dduddes,
Me thinks there’s gotta be a way to pass SV_VertexId from my vertex shader function to Geometry Shader function? Essentially I want to track which is the current vertex in my geom shader. I could also run a vertex counter in my geom function but I guess thats’ the point of SV_vertexId… I have tried to pass SV_VertexID in many ways but I can’t find the correct semantics? or am I missing something in how to pass from vs to gs? Here is some code, question goes down also to how to pass a variable between shader fucntions withotu semantics(custom semantics?)
Thankx a lot guys!
struct vsIn
{
float4 pos : POSITION;
uint vertexId : SV_VertexId;
};
struct gsIn
{
float4 pos: POSITION;
uint vertexIdPassed : ?????????;
};
gsIn VS(vsIn input)
{
gsIn output;
output.pos = input.pos;
output.vertexIdPassed = input.VertexID;
}