本文整理汇总了C++中CompositionTargetPass::setOnlyInitial方法的典型用法代码示例。如果您正苦于以下问题:C++ CompositionTargetPass::setOnlyInitial方法的具体用法?C++ CompositionTargetPass::setOnlyInitial怎么用?C++ CompositionTargetPass::setOnlyInitial使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompositionTargetPass
的用法示例。
在下文中一共展示了CompositionTargetPass::setOnlyInitial方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: recreateCompositor
//.........这里部分代码省略.........
"Motion Blur", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
CompositionTechnique *t = comp3->createTechnique();
t->setCompositorLogicName("Motion Blur");
{
CompositionTechnique::TextureDefinition *def = t->createTextureDefinition("scene");
def->width = 0;
def->height = 0;
def->formatList.push_back(PF_R8G8B8);
}
{
CompositionTechnique::TextureDefinition *def = t->createTextureDefinition("sum");
def->width = 0;
def->height = 0;
def->formatList.push_back(PF_R8G8B8);
}
{
CompositionTechnique::TextureDefinition *def = t->createTextureDefinition("temp");
def->width = 0;
def->height = 0;
def->formatList.push_back(PF_R8G8B8);
}
/// Render scene
{
CompositionTargetPass *tp = t->createTargetPass();
tp->setInputMode(CompositionTargetPass::IM_PREVIOUS);
tp->setOutputName("scene");
}
/// Initialisation pass for sum texture
{
CompositionTargetPass *tp = t->createTargetPass();
tp->setInputMode(CompositionTargetPass::IM_PREVIOUS);
tp->setOutputName("sum");
tp->setOnlyInitial(true);
}
/// Do the motion blur
{
CompositionTargetPass *tp = t->createTargetPass();
tp->setInputMode(CompositionTargetPass::IM_NONE);
tp->setOutputName("temp");
{ CompositionPass *pass = tp->createPass();
pass->setType(CompositionPass::PT_RENDERQUAD);
pass->setMaterialName("Ogre/Compositor/Combine");
pass->setIdentifier(120);
pass->setInput(0, "scene");
pass->setInput(1, "sum");
}
}
/// Copy back sum texture
{
CompositionTargetPass *tp = t->createTargetPass();
tp->setInputMode(CompositionTargetPass::IM_NONE);
tp->setOutputName("sum");
{ CompositionPass *pass = tp->createPass();
pass->setType(CompositionPass::PT_RENDERQUAD);
pass->setMaterialName("Ogre/Compositor/Copyback");
pass->setInput(0, "temp");
}
}
/// Display result
{
CompositionTargetPass *tp = t->getOutputTargetPass();
tp->setInputMode(CompositionTargetPass::IM_NONE);
{ CompositionPass *pass = tp->createPass();
pass->setType(CompositionPass::PT_RENDERQUAD);
pass->setMaterialName("Ogre/Compositor/MotionBlur");