mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-23 07:41:36 +00:00
Don't use FreezeOnCull for any particle system (#4744)
This commit is contained in:
parent
e89b304fed
commit
1fc7cb8191
7 changed files with 1 additions and 36 deletions
|
@ -6,6 +6,7 @@
|
||||||
Bug #3846: Strings starting with "-" fail to compile if not enclosed in quotes
|
Bug #3846: Strings starting with "-" fail to compile if not enclosed in quotes
|
||||||
Bug #3905: Great House Dagoth issues
|
Bug #3905: Great House Dagoth issues
|
||||||
Bug #4203: Resurrecting an actor should close the loot GUI
|
Bug #4203: Resurrecting an actor should close the loot GUI
|
||||||
|
Bug #4744: Invisible particles must still be processed
|
||||||
Bug #4752: UpdateCellCommand doesn't undo properly
|
Bug #4752: UpdateCellCommand doesn't undo properly
|
||||||
Bug #5100: Persuasion doesn't always clamp the resulting disposition
|
Bug #5100: Persuasion doesn't always clamp the resulting disposition
|
||||||
Bug #5120: Scripted object spawning updates physics system
|
Bug #5120: Scripted object spawning updates physics system
|
||||||
|
|
|
@ -1678,9 +1678,6 @@ namespace MWRender
|
||||||
SceneUtil::FindMaxControllerLengthVisitor findMaxLengthVisitor;
|
SceneUtil::FindMaxControllerLengthVisitor findMaxLengthVisitor;
|
||||||
node->accept(findMaxLengthVisitor);
|
node->accept(findMaxLengthVisitor);
|
||||||
|
|
||||||
// FreezeOnCull doesn't work so well with effect particles, that tend to have moving emitters
|
|
||||||
SceneUtil::DisableFreezeOnCullVisitor disableFreezeOnCullVisitor;
|
|
||||||
node->accept(disableFreezeOnCullVisitor);
|
|
||||||
node->setNodeMask(Mask_Effect);
|
node->setNodeMask(Mask_Effect);
|
||||||
|
|
||||||
params.mMaxControllerLength = findMaxLengthVisitor.getMaxLength();
|
params.mMaxControllerLength = findMaxLengthVisitor.getMaxLength();
|
||||||
|
|
|
@ -1731,9 +1731,6 @@ void SkyManager::setWeather(const WeatherResult& weather)
|
||||||
|
|
||||||
mParticleEffect->accept(alphaFaderSetupVisitor);
|
mParticleEffect->accept(alphaFaderSetupVisitor);
|
||||||
|
|
||||||
SceneUtil::DisableFreezeOnCullVisitor disableFreezeOnCullVisitor;
|
|
||||||
mParticleEffect->accept(disableFreezeOnCullVisitor);
|
|
||||||
|
|
||||||
SceneUtil::FindByClassVisitor findPSVisitor(std::string("ParticleSystem"));
|
SceneUtil::FindByClassVisitor findPSVisitor(std::string("ParticleSystem"));
|
||||||
mParticleEffect->accept(findPSVisitor);
|
mParticleEffect->accept(findPSVisitor);
|
||||||
|
|
||||||
|
|
|
@ -238,9 +238,6 @@ namespace MWWorld
|
||||||
state.mNode->addChild(projectileLightSource);
|
state.mNode->addChild(projectileLightSource);
|
||||||
projectileLightSource->setLight(projectileLight);
|
projectileLightSource->setLight(projectileLight);
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneUtil::DisableFreezeOnCullVisitor disableFreezeOnCullVisitor;
|
|
||||||
state.mNode->accept(disableFreezeOnCullVisitor);
|
|
||||||
|
|
||||||
state.mNode->addCullCallback(new SceneUtil::LightListCallback);
|
state.mNode->addCullCallback(new SceneUtil::LightListCallback);
|
||||||
|
|
||||||
|
|
|
@ -1103,8 +1103,6 @@ namespace NifOsg
|
||||||
partsys->getDefaultParticleTemplate().setColorRange(osgParticle::rangev4(osg::Vec4f(1.f,1.f,1.f,1.f), osg::Vec4f(1.f,1.f,1.f,1.f)));
|
partsys->getDefaultParticleTemplate().setColorRange(osgParticle::rangev4(osg::Vec4f(1.f,1.f,1.f,1.f), osg::Vec4f(1.f,1.f,1.f,1.f)));
|
||||||
partsys->getDefaultParticleTemplate().setAlphaRange(osgParticle::rangef(1.f, 1.f));
|
partsys->getDefaultParticleTemplate().setAlphaRange(osgParticle::rangef(1.f, 1.f));
|
||||||
|
|
||||||
partsys->setFreezeOnCull(true);
|
|
||||||
|
|
||||||
if (!partctrl->emitter.empty())
|
if (!partctrl->emitter.empty())
|
||||||
{
|
{
|
||||||
osg::ref_ptr<Emitter> emitter = handleParticleEmitter(partctrl);
|
osg::ref_ptr<Emitter> emitter = handleParticleEmitter(partctrl);
|
||||||
|
|
|
@ -46,17 +46,6 @@ namespace SceneUtil
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableFreezeOnCullVisitor::apply(osg::MatrixTransform &node)
|
|
||||||
{
|
|
||||||
traverse(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DisableFreezeOnCullVisitor::apply(osg::Drawable& drw)
|
|
||||||
{
|
|
||||||
if (osgParticle::ParticleSystem* partsys = dynamic_cast<osgParticle::ParticleSystem*>(&drw))
|
|
||||||
partsys->setFreezeOnCull(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NodeMapVisitor::apply(osg::MatrixTransform& trans)
|
void NodeMapVisitor::apply(osg::MatrixTransform& trans)
|
||||||
{
|
{
|
||||||
// Take transformation for first found node in file
|
// Take transformation for first found node in file
|
||||||
|
|
|
@ -45,20 +45,6 @@ namespace SceneUtil
|
||||||
std::vector<osg::Node *> mFoundNodes;
|
std::vector<osg::Node *> mFoundNodes;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Disable freezeOnCull for all visited particlesystems
|
|
||||||
class DisableFreezeOnCullVisitor : public osg::NodeVisitor
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DisableFreezeOnCullVisitor()
|
|
||||||
: osg::NodeVisitor(TRAVERSE_ALL_CHILDREN)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void apply(osg::MatrixTransform& node) override;
|
|
||||||
|
|
||||||
void apply(osg::Drawable& drw) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Maps names to nodes
|
/// Maps names to nodes
|
||||||
class NodeMapVisitor : public osg::NodeVisitor
|
class NodeMapVisitor : public osg::NodeVisitor
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue