|
|
@ -232,6 +232,10 @@ void CBloomEffect::applyBloom()
|
|
|
|
CDriverUser *dru = static_cast<CDriverUser *>(_Driver);
|
|
|
|
CDriverUser *dru = static_cast<CDriverUser *>(_Driver);
|
|
|
|
IDriver *drv = dru->getDriver();
|
|
|
|
IDriver *drv = dru->getDriver();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// backup
|
|
|
|
|
|
|
|
bool fogEnabled = _Driver->fogEnabled();
|
|
|
|
|
|
|
|
_Driver->enableFog(false);
|
|
|
|
|
|
|
|
|
|
|
|
NL3D::ITexture *renderTarget = drv->getRenderTarget();
|
|
|
|
NL3D::ITexture *renderTarget = drv->getRenderTarget();
|
|
|
|
nlassert(renderTarget);
|
|
|
|
nlassert(renderTarget);
|
|
|
|
nlassert(renderTarget->isBloomTexture());
|
|
|
|
nlassert(renderTarget->isBloomTexture());
|
|
|
@ -286,6 +290,9 @@ void CBloomEffect::applyBloom()
|
|
|
|
_BlurMat.getObjectPtr()->setTexture(2, NULL);
|
|
|
|
_BlurMat.getObjectPtr()->setTexture(2, NULL);
|
|
|
|
_BlurMat.getObjectPtr()->setTexture(3, NULL);
|
|
|
|
_BlurMat.getObjectPtr()->setTexture(3, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// restore
|
|
|
|
|
|
|
|
_Driver->enableFog(fogEnabled);
|
|
|
|
|
|
|
|
|
|
|
|
// recycle render targets
|
|
|
|
// recycle render targets
|
|
|
|
_Driver->getRenderTargetManager().recycleRenderTarget(_BlurFinalTex);
|
|
|
|
_Driver->getRenderTargetManager().recycleRenderTarget(_BlurFinalTex);
|
|
|
|
_BlurFinalTex = NULL;
|
|
|
|
_BlurFinalTex = NULL;
|
|
|
|