|
楼主 |
发表于 2010-6-30 16:00:19
|
显示全部楼层
试了试,发现应该是LightModel的问题,- globalStateset->removeAttribute(osg::StateAttribute::LIGHTMODEL);
复制代码 改成- osg::LightModel* lightModel = new osg::LightModel;
- lightModel->setAmbientIntensity(osg::Vec4(0,0,0,0));
- globalStateset->setAttributeAndModes(lightModel, osg::StateAttribute::ON);
复制代码 后,缺省的光源完全被屏蔽
查了下,GL_LIGHT_MODEL_AMBIENT的缺省值是0.2,0.2,0.2,1 |
|