[osg-users] specular highlight with SEPARATE_SPECULAR_COLOR
riccardo.corsi at vrmmp.it
Tue Oct 23 03:14:51 PDT 2007
I'm try to get a specular highlights effect by using the
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;
nVidia 7900 GTX (tried both older and latest drivers)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 211917 bytes
Desc: not available
More information about the osg-users