From 32540add2a2e95d641c21cbce249857b8128cf24 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 5 Aug 2014 02:24:11 +0200 Subject: [PATCH] 3D: Set matrix modes after changing render target in effect --- code/nel/src/3d/bloom_effect.cpp | 2 ++ code/nel/src/3d/fxaa.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/code/nel/src/3d/bloom_effect.cpp b/code/nel/src/3d/bloom_effect.cpp index fe82e43c6..aee1a26e7 100644 --- a/code/nel/src/3d/bloom_effect.cpp +++ b/code/nel/src/3d/bloom_effect.cpp @@ -274,6 +274,7 @@ void CBloomEffect::applyBloom() // apply blur with a blend operation drv->setRenderTarget(renderTarget); + _Driver->setMatrixMode2D11(); applyBlur(); // cleanup material texture references @@ -356,6 +357,7 @@ void CBloomEffect::doBlur(bool horizontalBlur) nlwarning("setRenderTarget return false with blur texture for bloom effect\n"); return; } + _Driver->setMatrixMode2D11(); // initialize vertex program drvInternal->activeVertexProgram(TextureOffsetVertexProgram); diff --git a/code/nel/src/3d/fxaa.cpp b/code/nel/src/3d/fxaa.cpp index 238303001..73146aabe 100644 --- a/code/nel/src/3d/fxaa.cpp +++ b/code/nel/src/3d/fxaa.cpp @@ -245,6 +245,7 @@ void CFXAA::applyEffect() dru->setRenderTarget(texNull); drv->swapTextureHandle(*renderTarget, *otherRenderTarget->getITexture()); drv->setRenderTarget(renderTarget); + m_Driver->setMatrixMode2D11(); // debug // m_Driver->clearBuffers(CRGBA(128, 128, 128, 128));