Rowley, Marlin R
2018-07-11 13:17:17 UTC
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:***@01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
***@lmco.com<mailto:***@lmco.com>
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:***@01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
***@lmco.com<mailto:***@lmco.com>