Hi Mike,
position->setScale(osg::Vec3(0.01,0.01,0.01));
When you use scale in a Transform, the geometry's normals also get
scaled. The normals are used to compute lighting, so it's "normal"
(geez, bad pun) that lighting is wrong.
You just need to tell OpenGL to rescale normals:
position->getOrCreateStateSet()->setMode(GL_RESCALE_NORMAL,
osg::StateAttribute::ON);
You could also use GL_NORMALIZE, same result.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org