How to determine the index ID in a vertex shader : r/opengl
文章推薦指數: 80 %
For example: If I have vertices v0,v1,v2 etc And indexes 0, 1, ... Then you can use gl_VertexID to individually access these two vertices. Foundtheinternet!Sorry,forsomereasonredditcan'tbereached.Retry Advertisement
延伸文章資訊
- 1Advanced GLSL - LearnOpenGL
The integer variable gl_VertexID holds the current ID of the vertex we're drawing ... An example ...
- 2Simple postprocessing in three.js | by Luigi De Rosa | Medium
There are already multiple examples and implementation in three.js. ... gl_VertexID is available ...
- 3Intro to GLSL - Cornell CS
- 4Using gl_VertexID as an array index? - OpenGL - Khronos ...
- 5gl_VertexID - OpenGL ES 3 Reference Pages - Khronos Group