don't render an EffectGeode if there is no valid technique
Normal geometry has a default effect; geometry with no default effect is unlikely to look correct with no state set applied. This fixes the problem of clouds being displayed as multi-colored rectangles when shader effects are turned off.
This commit is contained in:
@@ -56,9 +56,11 @@ void EffectCullVisitor::apply(osg::Geode& node)
|
|||||||
}
|
}
|
||||||
Effect* effect = eg->getEffect();
|
Effect* effect = eg->getEffect();
|
||||||
Technique* technique = 0;
|
Technique* technique = 0;
|
||||||
if (!(effect && (technique = effect->chooseTechnique(&getRenderInfo())))) {
|
if (!effect) {
|
||||||
CullVisitor::apply(node);
|
CullVisitor::apply(node);
|
||||||
return;
|
return;
|
||||||
|
} else if (!(technique = effect->chooseTechnique(&getRenderInfo()))) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// push the node's state.
|
// push the node's state.
|
||||||
osg::StateSet* node_state = node.getStateSet();
|
osg::StateSet* node_state = node.getStateSet();
|
||||||
|
|||||||
Reference in New Issue
Block a user