Hey, thanks for the answers. I was already doing the “whole node” blurring so I would only have to set the blur shader in the upper most node.
@MikhailSh I get the general idea but could you share some code for the overrides? I think I’m missing something here.
If I don’t visit the children in my overridden visit method how would the blurring work (since I have to call visit on the BlurNode)?
I’ve created a BlurNode and I’m adding my main interface class which inherits from Sprite and has buttons and other stuff added as childs.
So far I’ve done the following:
void BlurNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
if (!_visible)
{
return;
}
uint32_t flags = processParentFlags(parentTransform, parentFlags);
_director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
_director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
bool visibleByCamera = isVisitableByVisitingCamera();
if(!_children.empty())
{
sortAllChildren();
if (visibleByCamera) {
for(auto it=_children.cbegin(); it != _children.cend(); ++it)
(*it)->draw(renderer, _modelViewTransform, flags);
}
}
_director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
}
void BlurNode::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
this->_firstPass->begin();
this->visit(Director::getInstance()->getRenderer(), Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW), true);
this->_firstPass->end();
{
// DO HORIZONTAL BLUR SHADER SET UP
this->_firstPass->getSprite()->setGLProgramState(blur);
}
this->_secondPass->setPosition(this->getPosition());
this->_secondPass->begin();
this->_firstPass->getSprite()->visit();
this->_secondPass->end();
{
// DO VERTICAL BLUR SHADER SET UP
this->_secondPass->getSprite()->setGLProgramState(blur);
}
}
firstPass and secondPass are both RenderTextures.
This way, since I’m not visiting children, only the interface’s background gets drawn and not any of the buttons and stuff I’ve added to it.
If I decide to visit all of BlurNode children in visit() then I’ll get a crash since visit() is also called in draw() and there’s a infinite loop 
Maybe I have to visit all of the BlurNode’s children from its draw method? I’ve tried this by replacing
this->visit(Director::getInstance()->getRenderer(), Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW), true);
with:
for(auto it=_children.cbegin(); it != _children.cend(); ++it)
(*it)->visit(renderer, _modelViewTransform, flags);
But I’m getting the same result, only the interface background is getting drawn.