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:
parent
e37c218c2a
commit
59fc902cfb
@ -56,9 +56,11 @@ void EffectCullVisitor::apply(osg::Geode& node)
|
||||
}
|
||||
Effect* effect = eg->getEffect();
|
||||
Technique* technique = 0;
|
||||
if (!(effect && (technique = effect->chooseTechnique(&getRenderInfo())))) {
|
||||
if (!effect) {
|
||||
CullVisitor::apply(node);
|
||||
return;
|
||||
} else if (!(technique = effect->chooseTechnique(&getRenderInfo()))) {
|
||||
return;
|
||||
}
|
||||
// push the node's state.
|
||||
osg::StateSet* node_state = node.getStateSet();
|
||||
|
Loading…
Reference in New Issue
Block a user