[{"data":1,"prerenderedAt":180},["ShallowReactive",2],{"QIlzyXPsdh":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":179,"_id":4},"InvocationId","Invocation ID in a geometry or tessellation control shader","builtins",[],{"type":9,"children":10,"toc":175},"root",[11,24,37,58],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"invocationid",[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],{"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 current shader invocation in a\ngeometry shader, or the index of the output patch vertex in a tessellation\ncontrol shader.",{"type":12,"tag":25,"props":38,"children":39},{},[40,42,49,51,56],{"type":23,"value":41},"In a geometry shader, the index of the current shader invocation ranges from\nzero to the number of ",{"type":12,"tag":43,"props":44,"children":46},"a",{"href":45},"/chapters/geometry#geometry-invocations",[47],{"type":23,"value":48},"instances",{"type":23,"value":50}," declared in the\nshader minus one.\nIf the instance count of the geometry shader is one or is not specified,\nthen ",{"type":12,"tag":18,"props":52,"children":54},{"className":53},[],[55],{"type":23,"value":4},{"type":23,"value":57}," will be zero.",{"type":12,"tag":59,"props":60,"children":62},"validity-group",{"name":61},"Valid Usage",[63,116,156],{"type":12,"tag":64,"props":65,"children":67},"validity-field",{"name":66},"VUID-InvocationId-InvocationId-04257",[68],{"type":12,"tag":25,"props":69,"children":70},{},[71,73,78,80,85,87,93,95,101,103,109,110],{"type":23,"value":72},"The ",{"type":12,"tag":18,"props":74,"children":76},{"className":75},[],[77],{"type":23,"value":4},{"type":23,"value":79}," decoration ",{"type":12,"tag":81,"props":82,"children":84},"normative",{"type":83},"must",[],{"type":23,"value":86}," be used only within the\n",{"type":12,"tag":18,"props":88,"children":90},{"className":89},[],[91],{"type":23,"value":92},"TessellationControl",{"type":23,"value":94}," or ",{"type":12,"tag":18,"props":96,"children":98},{"className":97},[],[99],{"type":23,"value":100},"Geometry",{"type":23,"value":102}," ",{"type":12,"tag":18,"props":104,"children":106},{"className":105},[],[107],{"type":23,"value":108},"Execution",{"type":23,"value":102},{"type":12,"tag":18,"props":111,"children":113},{"className":112},[],[114],{"type":23,"value":115},"Model",{"type":12,"tag":64,"props":117,"children":119},{"name":118},"VUID-InvocationId-InvocationId-04258",[120],{"type":12,"tag":25,"props":121,"children":122},{},[123,125,130,131,134,136,142,143,149,150],{"type":23,"value":124},"The variable decorated with ",{"type":12,"tag":18,"props":126,"children":128},{"className":127},[],[129],{"type":23,"value":4},{"type":23,"value":102},{"type":12,"tag":81,"props":132,"children":133},{"type":83},[],{"type":23,"value":135}," be declared using\nthe ",{"type":12,"tag":18,"props":137,"children":139},{"className":138},[],[140],{"type":23,"value":141},"Input",{"type":23,"value":102},{"type":12,"tag":18,"props":144,"children":146},{"className":145},[],[147],{"type":23,"value":148},"Storage",{"type":23,"value":102},{"type":12,"tag":18,"props":151,"children":153},{"className":152},[],[154],{"type":23,"value":155},"Class",{"type":12,"tag":64,"props":157,"children":159},{"name":158},"VUID-InvocationId-InvocationId-04259",[160],{"type":12,"tag":25,"props":161,"children":162},{},[163,164,169,170,173],{"type":23,"value":124},{"type":12,"tag":18,"props":165,"children":167},{"className":166},[],[168],{"type":23,"value":4},{"type":23,"value":102},{"type":12,"tag":81,"props":171,"children":172},{"type":83},[],{"type":23,"value":174}," be declared as a\nscalar 32-bit integer value",{"title":176,"searchDepth":177,"depth":177,"links":178},"",2,[],"markdown",1725732531937]