本文整理汇总了C++中IShader::drop方法的典型用法代码示例。如果您正苦于以下问题:C++ IShader::drop方法的具体用法?C++ IShader::drop怎么用?C++ IShader::drop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IShader
的用法示例。
在下文中一共展示了IShader::drop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
}
// Set up post processing.
if (renderSystem->ShadersAreAvailable()
&& renderSystem->PostProcessingEnabled())
{
// bool flag indicates whether rendering to screen still occurs first before post processing
IPostProcessingChain *chain = renderSystem->CreatePostProcessingChain(true);
// Materials need:
// - Lighting = false
// - ZBuffer = false
// - ZWriteEnable = false
// For bloom, need:
// - bright filter
// - BlurH
// - BlurV
// (final one blended additively on to the screen)
video::SMaterial material;
material.Lighting = false;
material.ZBuffer = false;
material.ZWriteEnable = false;
material.AntiAliasing = video::EAAM_OFF;
IShader *shader;
// Bright filter
shader = renderSystem->CreateShader("ScreenQuad.vert", "Brightfilter.frag");
chain->AddEffect(material, shader, 2);
shader->drop();
// Horizontal blur
shader = renderSystem->CreateShader("ScreenQuad.vert", "BlurH.frag");
chain->AddEffect(material, shader, 2);
shader->drop();
// Vertical blur
// As this is the last effect it is rendered additively on to the screen.
shader = renderSystem->CreateShader("ScreenQuad.vert", "BlurV.frag", video::EMT_TRANSPARENT_ADD_COLOR);
chain->AddEffect(material, shader, 2);
shader->drop();
renderSystem->SetActivePostProcessingChain(chain);
chain->drop();
}
// Some sky
// Maybe this should be in Level?
// --> move it only when it is needed...
core::stringc skyDir = "skies/Set 42/";
core::stringc skyExt = "png";
world->SetSkyBox(
skyDir+"6."+skyExt,
skyDir+"5."+skyExt,
skyDir+"1."+skyExt,
skyDir+"3."+skyExt,
skyDir+"2."+skyExt,
skyDir+"4."+skyExt
);