forked from mirror/openmw-tes3mp
Handle multipass techniques in SetFilterSettingsVisitor
This commit is contained in:
parent
31988ca4cc
commit
71401aafe7
1 changed files with 18 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <osg/Version>
|
||||
|
||||
#include <osgParticle/ParticleSystem>
|
||||
#include <osgFX/Effect>
|
||||
|
||||
#include <osgUtil/IncrementalCompileOperation>
|
||||
|
||||
|
@ -153,12 +154,29 @@ namespace Resource
|
|||
|
||||
virtual void apply(osg::Node& node)
|
||||
{
|
||||
if (osgFX::Effect* effect = dynamic_cast<osgFX::Effect*>(&node))
|
||||
apply(*effect);
|
||||
|
||||
osg::StateSet* stateset = node.getStateSet();
|
||||
if (stateset)
|
||||
apply(stateset);
|
||||
|
||||
traverse(node);
|
||||
}
|
||||
|
||||
void apply(osgFX::Effect& effect)
|
||||
{
|
||||
for (int i =0; i<effect.getNumTechniques(); ++i)
|
||||
{
|
||||
osgFX::Technique* tech = effect.getTechnique(i);
|
||||
for (int pass=0; pass<tech->getNumPasses(); ++pass)
|
||||
{
|
||||
if (tech->getPassStateSet(pass))
|
||||
apply(tech->getPassStateSet(pass));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void apply(osg::Geode& geode)
|
||||
{
|
||||
osg::StateSet* stateset = geode.getStateSet();
|
||||
|
|
Loading…
Reference in a new issue