diff --git a/src/osgVolume/MultipassTechnique.cpp b/src/osgVolume/MultipassTechnique.cpp index eeded4ef1..34513cbb3 100644 --- a/src/osgVolume/MultipassTechnique.cpp +++ b/src/osgVolume/MultipassTechnique.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -298,7 +297,6 @@ void MultipassTechnique::init() osg::ref_ptr stateset = new osg::StateSet; _volumeRenderStateSet = stateset; - unsigned int texgenTextureUnit = 0; unsigned int volumeTextureUnit = 3; // set up uniforms @@ -342,22 +340,6 @@ void MultipassTechnique::init() { tf = dynamic_cast(cpv._tfProperty->getTransferFunction()); } - - osg::ref_ptr texgen = new osg::TexGen; - texgen->setMode(osg::TexGen::OBJECT_LINEAR); - texgen->setPlanesFromMatrix( geometryMatrix * osg::Matrix::inverse(imageMatrix)); - - if (masterLocator) - { - osg::ref_ptr locatorCallback = new TexGenLocatorCallback(texgen, masterLocator, layerLocator); - masterLocator->addCallback(locatorCallback.get()); - if (masterLocator != layerLocator) - { - if (layerLocator) layerLocator->addCallback(locatorCallback.get()); - } - } - - stateset->setTextureAttributeAndModes(texgenTextureUnit, texgen.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); } diff --git a/src/osgVolume/VolumeScene.cpp b/src/osgVolume/VolumeScene.cpp index ecb05eecd..45e79ee43 100644 --- a/src/osgVolume/VolumeScene.cpp +++ b/src/osgVolume/VolumeScene.cpp @@ -138,7 +138,7 @@ VolumeScene::TileData* VolumeScene::tileVisited(osgUtil::CullVisitor* cv, osgVol tileData->stateset = new osg::StateSet; tileData->stateset->setTextureAttribute(2, tileData->depthTexture.get()); - tileData->texgenUniform = new osg::Uniform("texgen2",osg::Matrixf()); + tileData->texgenUniform = new osg::Uniform("texgen",osg::Matrixf()); tileData->stateset->addUniform(tileData->texgenUniform); }