Well, the problem is that the normal vertices are PER_VERTEX, not PER_PRIMITIVE.

In Geometry shader, I only have access to the current primitive, not the whole 
mesh, right?

I need to

1. calculate the normal vector of each face (triangle) and add it to the normal 
vectors of all 3 vertices

2. normalize the normal vector of each vertex (optional)

Is there any way to access normal vector of each vertex in geometry shader?

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





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

Reply via email to