[osg-users] [osg::light] + textures!

Guy guy at dvp.co.il
Wed May 21 02:23:59 PDT 2008


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: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Shubham
Gupta
Sent: Wednesday, May 21, 2008 9:06 AM
To: osg-users at lists.openscenegraph.org
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>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080521/907d76a9/attachment.htm>


More information about the osg-users mailing list