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:
Robert Osfield
2002-07-15 13:20:41 +00:00
parent e9f30add38
commit 9c56a57de3
3 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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);