Description
VertexIndex
-
Decorating a variable with the
VertexIndex
built-in decoration will make that variable contain the index of the vertex that is being processed by the current vertex shader invocation. For non-indexed draws, this variable begins at thefirstVertex
parameter to vkCmdDraw or thefirstVertex
member of a structure consumed by vkCmdDrawIndirect and increments by one for each vertex in the draw. For indexed draws, its value is the content of the index buffer for the vertex plus thevertexOffset
parameter to vkCmdDrawIndexed or thevertexOffset
member of the structure consumed by vkCmdDrawIndexedIndirect.
Note
|
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.