Removed more references to global function.

This commit is contained in:
hiker 2015-05-21 10:09:43 +10:00
parent e9c2f0ecf1
commit 101fcf5df7

View File

@ -190,14 +190,14 @@ public:
assignSamplerNames(0, "tex", ST_BILINEAR_CLAMPED_FILTERED); assignSamplerNames(0, "tex", ST_BILINEAR_CLAMPED_FILTERED);
} // Gaussian6HBlurShader } // Gaussian6HBlurShader
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void render(float sigma_h) void render(const FrameBuffer &fb, int width, int height, float sigma_h)
{ {
setTextureUnits(irr_driver->getFBO(FBO_SCALAR_1024).getRTT()[0]); setTextureUnits(fb.getRTT()[0]);
drawFullScreenEffect( drawFullScreenEffect(
core::vector2df(1.f / UserConfigParams::m_shadows_resolution, core::vector2df(1.f / width,
1.f / UserConfigParams::m_shadows_resolution), 1.f / height),
sigma_h); sigma_h);
} // render } // renderq
}; // Gaussian6HBlurShader }; // Gaussian6HBlurShader
// ============================================================================ // ============================================================================
@ -995,7 +995,10 @@ void PostProcessing::renderGaussian6BlurLayer(FrameBuffer &in_fbo,
UserConfigParams::m_shadows_resolution, sigma_v); UserConfigParams::m_shadows_resolution, sigma_v);
in_fbo.BindLayer(layer); in_fbo.BindLayer(layer);
Gaussian6HBlurShader::getInstance()->render(sigma_h); Gaussian6HBlurShader::getInstance()
->render(irr_driver->getFBO(FBO_SCALAR_1024),
UserConfigParams::m_shadows_resolution,
UserConfigParams::m_shadows_resolution, sigma_h);
} }
else else
{ {
@ -1052,10 +1055,9 @@ void PostProcessing::renderGaussian6Blur(FrameBuffer &in_fbo,
sigma_v); sigma_v);
in_fbo.Bind(); in_fbo.Bind();
Gaussian6HBlurShader::getInstance()->setTextureUnits(auxiliary.getRTT()[0]); Gaussian6HBlurShader::getInstance()->setTextureUnits(auxiliary.getRTT()[0]);
DrawFullScreenEffect<Gaussian6HBlurShader> Gaussian6HBlurShader::getInstance()->render(auxiliary, in_fbo.getWidth(),
(core::vector2df(inv_width, inv_height), sigma_h); in_fbo.getHeight(), sigma_h);
} }
else else
{ {