What's the HLSL equivalence of gl_VertexId?

I am just curious. It seems that HLSL for Direct3D does not have any built-in variables at all.

BTW, I recently tried to use gl_VertexId on an old NV card, which supports GL_ARB_shader_objects but no GL_EXT_gpu_shader4. It complains “VERTEXID” semantics binding of gl_VertexId is not supported by vp40 profile.

Yes it has:
SV_VertexID, SV_PrimitiveID, SV_InstanceID

Cool, it works :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.