本文整理汇总了C++中Sampler::SetFiltering方法的典型用法代码示例。如果您正苦于以下问题:C++ Sampler::SetFiltering方法的具体用法?C++ Sampler::SetFiltering怎么用?C++ Sampler::SetFiltering使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sampler
的用法示例。
在下文中一共展示了Sampler::SetFiltering方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Postprocessing_DrawOldTV
void Postprocessing_DrawOldTV(Texture& renderTarget, Texture& scene)
{
renderTarget.BeginDrawing();
oldtv->material.SetTechnique("oldtv");
oldtv->material.SetTextureParameter("ColorMap", scene, Sampler::DefaultPostprocess);
oldtv->material.SetFloatParameter("Time", oldtv->time);
oldtv->material.SetFloatParameter("OverExposureAmount", 0.1f);
oldtv->material.SetFloatParameter("DustAmount", 4.0f);
oldtv->material.SetFloatParameter("FrameJitterFrequency", 3.0f);
oldtv->material.SetFloatParameter("MaxFrameJitter", 1.4f);
const Color filmColor(1.0f, 0.7559052f, 0.58474624f, 1.0f);
oldtv->material.SetFloatParameter("FilmColor", (const float*) &filmColor, 4);
oldtv->material.SetFloatParameter("GrainThicknes", 1.0f);
oldtv->material.SetFloatParameter("GrainAmount", 0.8f);
oldtv->material.SetFloatParameter("ScratchesAmount", 3.0f);
oldtv->material.SetFloatParameter("ScratchesLevel", 0.7f);
Sampler dustSampler;
dustSampler.SetFiltering(true, true);
dustSampler.SetWrapMode(Sampler::WrapMode_ClampToBorder, Sampler::WrapMode_ClampToBorder, Color::White);
oldtv->material.SetTextureParameter("DustMap", oldtv->dustMap, dustSampler);
Sampler lineSampler;
lineSampler.SetFiltering(false, false);
lineSampler.SetWrapMode(Sampler::WrapMode_ClampToBorder, Sampler::WrapMode_Clamp, Color::White);
oldtv->material.SetTextureParameter("LineMap", oldtv->lineMap, lineSampler);
Sampler tvSampler;
tvSampler.SetFiltering(true, true);
tvSampler.SetWrapMode(Sampler::WrapMode_Clamp, Sampler::WrapMode_Clamp);
oldtv->material.SetTextureParameter("TvMap", oldtv->tvAndNoiseMap, tvSampler);
Sampler noiseSampler;
noiseSampler.SetFiltering(true, true);
noiseSampler.SetWrapMode(Sampler::WrapMode_Repeat, Sampler::WrapMode_Repeat);
oldtv->material.SetTextureParameter("NoiseMap", oldtv->tvAndNoiseMap, noiseSampler);
oldtv->material.DrawFullscreenQuad();
renderTarget.EndDrawing();
}