gl_InvocationID - OpenGL ES 3.2 Reference Pages

## Name

gl_InvocationID — contains the invocation index of the current shader

## Declaration

`in int gl_InvocationID ;`

## Description

In the tessellation control language, `gl_InvocationID` contains the index of the output patch vertex assigned to the shader invocation. It is assigned an integer value in the range [0, N-1] where N is the number of output patch vertices.

In the geometry language, `gl_InvocationID` identifies the invocation number assigned to the geometry shader invocation. It is assigned an integer value in the range [0, N-1] where N is the number of geometry shader invocations per primitive.

## Version Support

| OpenGL ES Shading Language Version
--- | ---
Function Name | 1.00 | 3.00 | 3.10 | 3.20
`gl_InvocationID` | - | - | - | ✔

## See Also

gl_InstanceID

## Copyright

Copyright © 2011-2015 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.