[osg-users] Issue with Model Display in OSG with VR Juggler
Paul Martz
pmartz at skew-matrix.com
Thu Jul 3 12:10:16 PDT 2008
> > Have you tried "normalizing" your normals after scaling?
> By that I meant enabling GL_NORMALIZE.
Hi Gerrick --
To clarify, at the top level node of you model, get its StateSet and do
this:
setMode( GL_NORMALIZE, osg::StateAttribute::ON );
Alternately, if the scaling is uniform in all axes, you could rescale the
normals instead, which might be more efficient for vertex-limited rendering:
setMode( GL_RESCALE_NORMAL, osg::StateAttribute::ON );
The difference is that the former is almost universally implemented in
OpenGL with a per-vertex sqrt, whereas the latter is typically implemented
in OpenGL with a per-vertex scale (multiply) and is therefore less
expensive.
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466
More information about the osg-users
mailing list