[osg-users] World space normal.

Rowley, Marlin R marlin.r.rowley at lmco.com
Wed Jul 11 06:17:17 PDT 2018


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
[cid:image002.jpg at 01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.rowley at lmco.com<mailto:marlin.r.rowley at lmco.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180711/c559cc80/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3114 bytes
Desc: image001.jpg
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180711/c559cc80/attachment.jpg>


More information about the osg-users mailing list