[{"data":1,"prerenderedAt":228},["ShallowReactive",2],{"ehKsNJB07e":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":227,"_id":4},"VertexIndex","Vertex index of a shader invocation","builtins",[],{"type":9,"children":10,"toc":223},"root",[11,24,100,114],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"vertexindex",[17],{"type":12,"tag":18,"props":19,"children":21},"code",{"className":20},[],[22],{"type":23,"value":4},"text",{"type":12,"tag":25,"props":26,"children":27},"p",{},[28,30,35,37,43,45,52,54,59,61,67,69,75,77,83,85,90,92,98],{"type":23,"value":29},"Decorating a variable with the ",{"type":12,"tag":18,"props":31,"children":33},{"className":32},[],[34],{"type":23,"value":4},{"type":23,"value":36}," built-in decoration will\nmake that variable contain the index of the vertex that is being processed\nby the current vertex shader invocation.\nFor non-indexed draws, this variable begins at the ",{"type":12,"tag":18,"props":38,"children":40},{"className":39},[],[41],{"type":23,"value":42},"firstVertex",{"type":23,"value":44},"\nparameter to ",{"type":12,"tag":46,"props":47,"children":49},"a",{"href":48},"/man/vkCmdDraw",[50],{"type":23,"value":51},"vkCmdDraw",{"type":23,"value":53}," or the ",{"type":12,"tag":18,"props":55,"children":57},{"className":56},[],[58],{"type":23,"value":42},{"type":23,"value":60}," member of a structure\nconsumed by ",{"type":12,"tag":46,"props":62,"children":64},{"href":63},"/man/vkCmdDrawIndirect",[65],{"type":23,"value":66},"vkCmdDrawIndirect",{"type":23,"value":68}," and increments by one for each vertex in\nthe draw.\nFor indexed draws, its value is the content of the index buffer for the\nvertex plus the ",{"type":12,"tag":18,"props":70,"children":72},{"className":71},[],[73],{"type":23,"value":74},"vertexOffset",{"type":23,"value":76}," parameter to ",{"type":12,"tag":46,"props":78,"children":80},{"href":79},"/man/vkCmdDrawIndexed",[81],{"type":23,"value":82},"vkCmdDrawIndexed",{"type":23,"value":84}," or\nthe ",{"type":12,"tag":18,"props":86,"children":88},{"className":87},[],[89],{"type":23,"value":74},{"type":23,"value":91}," member of the structure consumed by\n",{"type":12,"tag":46,"props":93,"children":95},{"href":94},"/man/vkCmdDrawIndexedIndirect",[96],{"type":23,"value":97},"vkCmdDrawIndexedIndirect",{"type":23,"value":99},".",{"type":12,"tag":101,"props":102,"children":103},"note",{},[104],{"type":12,"tag":25,"props":105,"children":106},{},[107,112],{"type":12,"tag":18,"props":108,"children":110},{"className":109},[],[111],{"type":23,"value":4},{"type":23,"value":113}," starts at the same starting value for each instance.",{"type":12,"tag":115,"props":116,"children":118},"validity-group",{"name":117},"Valid Usage",[119,164,204],{"type":12,"tag":120,"props":121,"children":123},"validity-field",{"name":122},"VUID-VertexIndex-VertexIndex-04398",[124],{"type":12,"tag":25,"props":125,"children":126},{},[127,129,134,136,141,143,149,151,157,158],{"type":23,"value":128},"The ",{"type":12,"tag":18,"props":130,"children":132},{"className":131},[],[133],{"type":23,"value":4},{"type":23,"value":135}," decoration ",{"type":12,"tag":137,"props":138,"children":140},"normative",{"type":139},"must",[],{"type":23,"value":142}," be used only within the\n",{"type":12,"tag":18,"props":144,"children":146},{"className":145},[],[147],{"type":23,"value":148},"Vertex",{"type":23,"value":150}," ",{"type":12,"tag":18,"props":152,"children":154},{"className":153},[],[155],{"type":23,"value":156},"Execution",{"type":23,"value":150},{"type":12,"tag":18,"props":159,"children":161},{"className":160},[],[162],{"type":23,"value":163},"Model",{"type":12,"tag":120,"props":165,"children":167},{"name":166},"VUID-VertexIndex-VertexIndex-04399",[168],{"type":12,"tag":25,"props":169,"children":170},{},[171,173,178,179,182,184,190,191,197,198],{"type":23,"value":172},"The variable decorated with ",{"type":12,"tag":18,"props":174,"children":176},{"className":175},[],[177],{"type":23,"value":4},{"type":23,"value":150},{"type":12,"tag":137,"props":180,"children":181},{"type":139},[],{"type":23,"value":183}," be declared using the\n",{"type":12,"tag":18,"props":185,"children":187},{"className":186},[],[188],{"type":23,"value":189},"Input",{"type":23,"value":150},{"type":12,"tag":18,"props":192,"children":194},{"className":193},[],[195],{"type":23,"value":196},"Storage",{"type":23,"value":150},{"type":12,"tag":18,"props":199,"children":201},{"className":200},[],[202],{"type":23,"value":203},"Class",{"type":12,"tag":120,"props":205,"children":207},{"name":206},"VUID-VertexIndex-VertexIndex-04400",[208],{"type":12,"tag":25,"props":209,"children":210},{},[211,212,217,218,221],{"type":23,"value":172},{"type":12,"tag":18,"props":213,"children":215},{"className":214},[],[216],{"type":23,"value":4},{"type":23,"value":150},{"type":12,"tag":137,"props":219,"children":220},{"type":139},[],{"type":23,"value":222}," be declared as a\nscalar 32-bit integer value",{"title":224,"searchDepth":225,"depth":225,"links":226},"",2,[],"markdown",1725732536813]