Fixed the orientation of the osgreflect demo so that the reflection plane
is orientated towards the viewer. Changed the lightmodel ambient level to 0.1,0.1,0.1 instead of 0.0, so that a small amount of ambient lighting is available to render back surfaces. The osgreflect and osgprerender suffered unexpected behaviors because of no lighting on the backfaces.
This commit is contained in:
@@ -66,8 +66,8 @@ echo osgmultitexture cessnafire.osg
|
||||
osmultitexture cessnafire.osg
|
||||
more memleaks.log
|
||||
|
||||
echo osgreflect cow.osg
|
||||
osgreflect cow.osg
|
||||
echo osgreflect cessna.osg
|
||||
osgreflect cessna.osg
|
||||
more memleaks.log
|
||||
|
||||
echo osgscribe cow.osg
|
||||
|
||||
@@ -49,8 +49,8 @@ osgimpostor Town.osg
|
||||
echo osgmultitexture cessnafire.osg
|
||||
osgmultitexture cessnafire.osg
|
||||
|
||||
echo osgreflect cow.osg
|
||||
osgreflect cow.osg
|
||||
echo osgreflect cessna.osg
|
||||
osgreflect cessna.osg
|
||||
|
||||
echo osgscribe cow.osg
|
||||
osgscribe cow.osg
|
||||
|
||||
@@ -104,7 +104,7 @@ void SceneView::setDefaults()
|
||||
_globalState->setTextureAttributeAndModes(0,texenv, osg::StateAttribute::ON);
|
||||
|
||||
osg::LightModel* lightmodel = osgNew osg::LightModel;
|
||||
lightmodel->setAmbientIntensity(osg::Vec4(0.0f,0.0f,0.0f,1.0f));
|
||||
lightmodel->setAmbientIntensity(osg::Vec4(0.1f,0.1f,0.1f,1.0f));
|
||||
_globalState->setAttributeAndModes(lightmodel, osg::StateAttribute::ON);
|
||||
|
||||
_backgroundColor.set(0.2f, 0.2f, 0.4f, 1.0f);
|
||||
|
||||
Reference in New Issue
Block a user