error with glsl input: error 30015: undefined identifier 'gl_VertexID'
#8276
Answered
by
juliusikkala
TomSirgedas
asked this question in
Q&A
-
Hello! I'm interested in automating the translation of GLSL shaders to WGSL. But, I'm running into a problem when the vertex shader uses vertex.glsl
Command line and output:
|
Beta Was this translation helpful? Give feedback.
Answered by
juliusikkala
Aug 22, 2025
Replies: 1 comment 2 replies
-
You may be able to use |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
TomSirgedas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may be able to use
gl_VertexIndex
instead. This difference is due to Slang's GLSL compatibility mostly matching Vulkan-flavored GLSL, not OpenGL.gl_InstanceID
andgl_VertexID
aregl_InstanceIndex
andgl_VertexIndex
in Vulkan-targeting GLSL.