diff --git a/examples/osgspotlight/osgspotlight.cpp b/examples/osgspotlight/osgspotlight.cpp index 2a2ed172e..0d973a807 100644 --- a/examples/osgspotlight/osgspotlight.cpp +++ b/examples/osgspotlight/osgspotlight.cpp @@ -121,7 +121,9 @@ osg::Node* createSpotLightNode(const osg::Vec3& position, const osg::Vec3& direc osg::TexGen* texgen = texgenNode->getTexGen(); texgen->setMode(osg::TexGen::EYE_LINEAR); texgen->setPlanesFromMatrix(osg::Matrixd::lookAt(position, position+direction, up)* - osg::Matrixd::perspective(angle,1.0,0.1,100)); + osg::Matrixd::perspective(angle,1.0,0.1,100)* + osg::Matrixd::translate(1.0,1.0,1.0)* + osg::Matrixd::scale(0.5,0.5,0.5)); group->addChild(texgenNode);