Removed nolonger used code paths

This commit is contained in:
Robert Osfield
2014-01-20 16:21:24 +00:00
parent 54a3f76a2b
commit 8a0e49d780
2 changed files with 6 additions and 66 deletions

View File

@@ -61,13 +61,12 @@ class OSGVOLUME_EXPORT MultipassTechnique : public VolumeTechnique
enum ShaderMask
{
FRONT_SHADERS = 1,
BACK_SHADERS = 2,
STANDARD_SHADERS = 4,
LIT_SHADERS = 8,
ISO_SHADERS = 16,
MIP_SHADERS = 32,
TF_SHADERS = 64
BACK_SHADERS = 1,
STANDARD_SHADERS = 2,
LIT_SHADERS = 4,
ISO_SHADERS = 8,
MIP_SHADERS = 16,
TF_SHADERS = 32
};
typedef std::map<int, osg::ref_ptr<osg::StateSet> > StateSetMap;

View File

@@ -462,15 +462,6 @@ void MultipassTechnique::init()
}
#endif
osg::ref_ptr<osg::Shader> front_main_fragmentShader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, "shaders/volume_multipass_front.frag");
#if 0
if (!front_main_fragmentShader)
{
#include "Shaders/volume_multipass_front_frag.cpp"
front_main_fragmentShader = new osg::Shader(osg::Shader::VERTEX, volume_multipass_front_frag));
}
#endif
osg::ref_ptr<osg::Shader> back_main_fragmentShader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, "shaders/volume_multipass_back_with_front_depthtexture.frag");;
//osg::ref_ptr<osg::Shader> back_main_fragmentShader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, "shaders/volume_multipass_back.frag");
@@ -485,16 +476,6 @@ void MultipassTechnique::init()
// clear any previous settings
_stateSetMap.clear();
osg::ref_ptr<osg::StateSet> front_stateset_prototype = new osg::StateSet;
osg::ref_ptr<osg::Program> front_program_prototype = new osg::Program;
{
front_stateset_prototype->setAttributeAndModes(front_CullFace.get(), osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
front_program_prototype->addShader(main_vertexShader.get());
front_program_prototype->addShader(front_main_fragmentShader.get());
front_program_prototype->addShader(computeRayColorShader.get());
}
osg::ref_ptr<osg::StateSet> back_stateset_prototype = new osg::StateSet;
osg::ref_ptr<osg::Program> back_program_prototype = new osg::Program;
{
@@ -533,9 +514,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[STANDARD_SHADERS|FRONT_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[STANDARD_SHADERS|BACK_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -552,10 +530,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[STANDARD_SHADERS|FRONT_SHADERS|TF_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[STANDARD_SHADERS|BACK_SHADERS|TF_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -575,9 +549,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[ISO_SHADERS|FRONT_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[ISO_SHADERS|BACK_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -594,10 +565,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[ISO_SHADERS|FRONT_SHADERS|TF_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[ISO_SHADERS|BACK_SHADERS|TF_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -617,9 +584,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[MIP_SHADERS|FRONT_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[MIP_SHADERS|BACK_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -636,10 +600,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[MIP_SHADERS|FRONT_SHADERS|TF_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[MIP_SHADERS|BACK_SHADERS|TF_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -659,9 +619,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[LIT_SHADERS|FRONT_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[LIT_SHADERS|BACK_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -678,10 +635,6 @@ void MultipassTechnique::init()
}
#endif
// front
_stateSetMap[LIT_SHADERS|FRONT_SHADERS|TF_SHADERS] = createStateSet(front_stateset_prototype.get(), front_program_prototype.get(), accumulateSamplesShader.get());
// back
_stateSetMap[LIT_SHADERS|BACK_SHADERS|TF_SHADERS] = createStateSet(back_stateset_prototype.get(), back_program_prototype.get(), accumulateSamplesShader.get());
}
@@ -815,10 +768,8 @@ void MultipassTechnique::cull(osgUtil::CullVisitor* cv)
}
}
//int shaderMaskFront = shaderMask | FRONT_SHADERS;
int shaderMaskBack = shaderMask | BACK_SHADERS;
// OSG_NOTICE<<"shaderMaskFront "<<shaderMaskFront<<std::endl;
// OSG_NOTICE<<"shaderMaskBack "<<shaderMaskBack<<std::endl;
if (vs)
@@ -835,7 +786,6 @@ void MultipassTechnique::cull(osgUtil::CullVisitor* cv)
}
//osg::ref_ptr<osg::StateSet> front_stateset = _stateSetMap[shaderMaskFront];
osg::ref_ptr<osg::StateSet> back_stateset = _stateSetMap[shaderMaskBack];
osg::ref_ptr<osg::StateSet> moving_stateset = (_whenMovingStateSet.valid() && isMoving(cv)) ? _whenMovingStateSet : 0;
@@ -845,15 +795,6 @@ void MultipassTechnique::cull(osgUtil::CullVisitor* cv)
cv->pushStateSet(moving_stateset.get());
}
#if 0
if (front_stateset.valid())
{
// OSG_NOTICE<<"Have front stateset"<<std::endl;
cv->pushStateSet(front_stateset.get());
_transform->accept(*cv);
cv->popStateSet();
}
#endif
if (back_stateset.valid())
{
// OSG_NOTICE<<"Have back stateset"<<std::endl;