guilianzhang wrote:
> Hello Mike and Paul,
> I can easily get the point transformation matrix in this way:
> >> mat4 ToWorldMatrix = osg_ViewMatrixInverse* gl_ModelViewMatrix;
> >> WorldPos= ToWorldMatrix * gl_Vertex;
> How can I get the inverse transpose of the ToWorldMatrix and set its
> translation part to zero? There seems to be no inverse and transpose
> funtions in glsl.

Looks like this solution is in response to my question to Mike. I wasn't
suggesting that this is how you solve your problem.

Mike's original reply might be better:

"You'll need to generate a new normal matrix, which is defined as the
upper-left mat3 of the inverse transpose of the transformation matrix."

Although I can't help you with implementing that as I don't know any GLSL ;-)



Paul

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

Reply via email to