Shouldn't the normal be multiplied by the inverse transpose of the modelview 
matrix? (Only upper 3x3 portion)


Sent via the Samsung Galaxy S7 active, an AT&T 4G LTE smartphone
-------- Original message --------From: "Rowley, Marlin R" 
<marlin.r.row...@lmco.com> Date: 7/11/18  7:17 AM  (GMT-07:00) To: 
OpenSceneGraph Users <osg-users@lists.openscenegraph.org> Subject: [osg-users] 
World space normal. 


I have a world space vertex computed as follows:
 
WorldVertex = osg_ViewMatrixInverse * gl_ModelViewMatrix * aVertex;
 
I would like to get the world space normal from this vertex.  Is there an 
equivalent osg_* matrix that does the same thing?
 
I tried this:
 
NormalWorld = gl_NormalMatrix * gl_Normal;  
 
But I know that is only putting the normal in view space.
 
----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.row...@lmco.com
 

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to