diff --git a/src/graphics/post_processing.cpp b/src/graphics/post_processing.cpp index 4a1024868..d194c2a70 100644 --- a/src/graphics/post_processing.cpp +++ b/src/graphics/post_processing.cpp @@ -41,6 +41,22 @@ using namespace video; using namespace scene; +// ============================================================================ +class Gaussian3HBlurShader : public Shader, + public TextureReadNew +{ +public: + Gaussian3HBlurShader() + { + loadProgram(OBJECT, GL_VERTEX_SHADER, "screenquad.vert", + GL_FRAGMENT_SHADER, "gaussian3h.frag"); + assignUniforms("pixel"); + + assignSamplerNames(m_program, 0, "tex", ST_BILINEAR_CLAMPED_FILTERED); + } // Gaussian3HBlurShader +}; // Gaussian3HBlurShader + // ============================================================================ class ComputeShadowBlurVShader : public ShadersetTextureUnits(auxiliary.getRTT()[0]); - DrawFullScreenEffect(core::vector2df(inv_width, inv_height)); + Gaussian3HBlurShader::getInstance()->setTextureUnits(auxiliary.getRTT()[0]); + DrawFullScreenEffect(core::vector2df(inv_width, inv_height)); } } diff --git a/src/graphics/shaders.cpp b/src/graphics/shaders.cpp index a6bb022d4..75dda2821 100644 --- a/src/graphics/shaders.cpp +++ b/src/graphics/shaders.cpp @@ -1014,17 +1014,6 @@ namespace FullScreenShader assignSamplerNames(m_program, 0, "tex", ST_BILINEAR_CLAMPED_FILTERED); } - Gaussian3HBlurShader::Gaussian3HBlurShader() - { - loadProgram(OBJECT, - GL_VERTEX_SHADER, "screenquad.vert", - GL_FRAGMENT_SHADER, "gaussian3h.frag"); - assignUniforms("pixel"); - - assignSamplerNames(m_program, 0, "tex", ST_BILINEAR_CLAMPED_FILTERED); - } - - PassThroughShader::PassThroughShader() { loadProgram(OBJECT, diff --git a/src/graphics/shaders.hpp b/src/graphics/shaders.hpp index 69b9a540b..47c884fc9 100644 --- a/src/graphics/shaders.hpp +++ b/src/graphics/shaders.hpp @@ -316,13 +316,6 @@ public: HorizontalBlurShader(); }; -class Gaussian3HBlurShader : public Shader, - public TextureReadNew -{ -public: - Gaussian3HBlurShader(); -}; - class PassThroughShader : public Shader, public TextureReadNew