I need to generate an Index Map (Index list) containing the id of each projected vertex. My shader code is based on NVIDIA CG 3.0 and I can't find in the documentation the build-in variable name to extract the id of each vertex.
In GLSL is something like: gl_VertexID. What is the equivalent in CG? If is not accessible, can you think of other way of generating an Index Map that doesn't involve extra storage?
CG uses semantic binding as in HLSL. I think the semantic is
VERTEXID
, if you can't find an example in your CG toolkit, look in directx examples forSV_VertexID
and follow a similar syntax for CGVERTEXID
.