I'm writing a shader and I just wanna ask if it's possible to get the ID of the vertex that is currently being manipulated. I read something about gl_vertexID, but I couldn't find out if that is something I can use.
Take the 2-minute tour
×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.
Answer: Added the vertexIDs in a second uv(set x value to the id) channel in the mesh(from my c# code), and then in the shader I could use the ids as I needed, example:
|
|||||||||||||
|