Hi Ying,

This is not possible directly. The vertex shader processes one vertex per run. You could check gl_VertexId [1] if you need to know which vertex is being processed in the current run. Another option is to store the distortion information inside an vertex attribute per vertex. Since you didn't explain what the source of your distortion information is we can only guess what you really want here ;-)

Cheers
Sebastian


[1] https://www.opengl.org/sdk/docs/man/html/gl_VertexID.xhtml

Hello,

Would someone tell me how to access all the vertexes of a 3d model in the 
vertex shader?

I want to render a distorted model by chaning the positions of the 3d model's 
vertexes. I tried to use 'gl_Vertex' to access the vertexes, but seems that it 
didn't work.

Hope someone could help me on this.

Thank you!

Cheers,
ying

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59915#59915





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to