You should split the specular lighting from the ambient+diffuse
lighting. It should be something with the Light Model of OpenGL.

 

Try code similar to:

 

    osg::LightModel* lightModel = new osg::LightModel;

 
lightModel->setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR);

    sunLightSource->getOrCreateStateSet()->setAttribute(lightModel);

 

look at osgplanet example.

 

Good luck,

 Guy.

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shubham
Gupta
Sent: Wednesday, May 21, 2008 9:06 AM
To: [email protected]
Subject: [osg-users] [osg::light] + textures!

 

Hello,
I am using spotlight in one of the code. But when the light of the
spotlight falls on a texture. It does not enlighten it. 

That means I cannot use spotlight on textures?

--
Shubham Gupta





________________________________

What is your Emotional Quotient? Find out.
<http://in.rd.yahoo.com/tagline_glue_1/*http:/in.search.yahoo.com/search
?&fr=na_onnetwork_mail_taglines&ei=UTF-8&rd=r1&p=emotional+quotient>  

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to