I'm moving some code from the CPU to GPU and needed to render to a 3D texture. I figured I'd use the geometry shader to generate the trianges and just use a simple vertex shader to pass vertex id's on to the geometry shader. Something like this for the vertex shader:
uint vs_main (uint id : SV_VertexID) : VERTEX_ID {
return id;
}
That way I don't actually need a vertex buffer.
Now I'd like to be able to specify a range of z slices to render (start at slice 5, render to slice 10). I could pass the start value in a constant buffer but ID3D11DeviceContext::Draw() has the StartVertexLocation parameter. I was wondering, but couldn't find any definitive, on how the StartVertexLocation interacted with SV_VertexID.
Any ideas? Comments? Suggestions?