Hello, Could you tell me what do you mean "define a mapping from vertex numbers to st coordinate"? Could I do like this in the fragment shader?
gl_TexCoord[0].st = vec2(position.x, position.y); gl_FragColor = texture2D(myTexture, gl_TexCoord[0].st); where position is the distorted pixel coordinates. But how to write the vertex shader? Thanks! Cheers, Ying Solkar wrote: > > Becky wrote: > > Would someone tell me how to access all the vertexes of a 3d model in the > > vertex shader? > > > Hi Becky! > > You would need to define a mapping from vertex numbers to st coordinates, > then store the position data in a texture according to that mapping and > provide that texture via a sampler uniform. > . > > Best regards, > S. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60227#60227 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

