diff --git a/data/shaders/blurshadowH.comp b/data/shaders/blurshadowH.comp new file mode 100644 index 000000000..e69de29bb diff --git a/data/shaders/blurshadowV.comp b/data/shaders/blurshadowV.comp new file mode 100644 index 000000000..e69de29bb diff --git a/src/graphics/shaders.cpp b/src/graphics/shaders.cpp index b953b776f..4319ea4cd 100644 --- a/src/graphics/shaders.cpp +++ b/src/graphics/shaders.cpp @@ -1752,6 +1752,16 @@ namespace FullScreenShader AssignTextureUnit(Program, TexUnit(TU_dest, "dest")); } + ComputeShadowBlurHShader::ComputeShadowBlurHShader() + { + Program = LoadProgram(OBJECT, + GL_COMPUTE_SHADER, file_manager->getAsset("shaders/blurshadowH.comp").c_str()); + TU_dest = 1; + AssignUniforms("pixel", "sigma"); + AssignSamplerNames(Program, 0, "source"); + AssignTextureUnit(Program, TexUnit(TU_dest, "dest")); + } + Gaussian6HBlurShader::Gaussian6HBlurShader() { Program = LoadProgram(OBJECT, @@ -1812,6 +1822,16 @@ namespace FullScreenShader AssignTextureUnit(Program, TexUnit(TU_dest, "dest")); } + ComputeShadowBlurVShader::ComputeShadowBlurVShader() + { + Program = LoadProgram(OBJECT, + GL_COMPUTE_SHADER, file_manager->getAsset("shaders/blurshadowV.comp").c_str()); + TU_dest = 1; + AssignUniforms("pixel", "sigma"); + AssignSamplerNames(Program, 0, "source"); + AssignTextureUnit(Program, TexUnit(TU_dest, "dest")); + } + Gaussian6VBlurShader::Gaussian6VBlurShader() { Program = LoadProgram(OBJECT, diff --git a/src/graphics/shaders.hpp b/src/graphics/shaders.hpp index 8e7b1d53a..2f1eb1b00 100644 --- a/src/graphics/shaders.hpp +++ b/src/graphics/shaders.hpp @@ -471,6 +471,13 @@ public: ComputeGaussian6HBlurShader(); }; +class ComputeShadowBlurHShader : public ShaderHelperSingleton, public TextureRead +{ +public: + GLuint TU_dest; + ComputeShadowBlurHShader(); +}; + class Gaussian6HBlurShader : public ShaderHelperSingleton, public TextureRead { public: @@ -510,6 +517,13 @@ public: ComputeGaussian6VBlurShader(); }; +class ComputeShadowBlurVShader : public ShaderHelperSingleton, public TextureRead +{ +public: + GLuint TU_dest; + ComputeShadowBlurVShader(); +}; + class Gaussian6VBlurShader : public ShaderHelperSingleton, public TextureRead { public: