I have an ITexture *Bitmap::Surface.
The problem is that the texture gets drawn but not it's blurred.
hblurpass, vblurpass are classes with a render() method that renders a quad.
Code: Select all
hblurpass->material.setMaterialType((video::E_MATERIAL_TYPE)gpu->addHighLevelShaderMaterial(0, 0, video::EVST_VS_1_1, "hblurpass.hlsl", "main"));
vblurpass->material.setMaterialType((video::E_MATERIAL_TYPE)gpu->addHighLevelShaderMaterial(0, 0, video::EVST_VS_1_1, "vblurpass.hlsl", "main"));
Code: Select all
void Bitmap::blur()
{
// set perspective correction, the rest of the s**t... then
driver->beginScene();
driver->setRenderTarget(this->Surface);
driver->draw2DImage(mytexture); //texture gets drawn
hblurpass->render();
vblurpass->render();
driver->setRenderTarget(0);
driver->endScene();
}