PostProcessor *proc = 0;
if(!i->slot_name.empty())
proc = get_item(postprocessors, i->slot_name);
- if(!proc && i->postprocessor_template)
- proc = i->postprocessor_template->create(pipeline.get_width(), pipeline.get_height());
if(proc)
- pipeline.add_postprocessor_owned(proc);
+ pipeline.add_postprocessor(*proc);
+ else if(i->postprocessor_template)
+ {
+ proc = i->postprocessor_template->create(pipeline.get_width(), pipeline.get_height());
+ if(proc)
+ pipeline.add_postprocessor_owned(proc);
+ }
}
}