Hi Paul,
If you multiply the ModelView matrix by the inverse view matrix
(osg_ViewMatrixInverse) you'll be left with the model matrix. That's
what you want to multiply by.
Very handy uniform that.
http://www.opengl.org/sdk/libs/OpenSceneGraph/glsl_quickref.pdf
Kim.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Paul
Griffiths
Sent: 27 May 2009 12:02
To: [email protected]
Subject: Re: [osg-users] vertex shader help: compare position against
plane
I know the code:
vec3 worldPos = gl_ModelViewMatrix * gl_Vertex;
is worng, if i rotate the view so does this position. i need the world
position and not the modelview position.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13023#13023
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
*****************************************************************************************
To view the terms under which this email is distributed, please go to
http://www.hull.ac.uk/legal/email_disclaimer.html
*****************************************************************************************
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org