[osg-users] specular highlight with SEPARATE_SPECULAR_COLOR
ledocc at gmail.com
Tue Oct 23 08:26:38 PDT 2007
Linux Fedora 7
NVidia GeForce 8800
All work fine for me.
I just do "osglight_modified cow.osg"
I join the osglight_modified.cpp simplified and updated to OSG2.2.
Many bug has be fix and feature added since the OSG 1.2 Version.
Perhaps an update to OSG 2.2 will be a good choice for you.
2007/10/23, Riccardo Corsi <riccardo.corsi at vrmmp.it>:
> Hi all,
> I'm try to get a specular highlights effect by using the
> osg::LightModel::SEPARATE_SPECULAR_COLOR mode.
> If I got it straight, this should compute a second color for the
> specular component to be added after lighting and texturing.
> So for instance, by using a light with white specular component and on a
> material with white specular color, I'd expect a white highlight in the
> final result. Instead what I get is the highlight modulated by the
> texture, as if I were using osg::LightModel::SINGLE_COLOR mode.
> Any suggestion on where I might be wrong?
> Find attached a modified osgLight example to reproduce the problem with
> a sample model.
> I basically removed the model animation, set a white specular on the
> light number 2, and added these lines of code:
> osg::StateSet* pSS = rootnode->getOrCreateStateSet();
> // set separate specular color
> osg::LightModel* pLightModel =new osg::LightModel;
> pSS->setAttributeAndModes(pLightModel, osg::StateAttribute::ON
> I'm on
> osg 1.2
> nVidia 7900 GTX (tried both older and latest drivers)
> Thank you
> osg-users mailing list
> osg-users at lists.openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users