Add a shader to blur shadow

This commit is contained in:
Vincent Lejeune 2014-11-15 20:37:47 +01:00
parent 687bb6e065
commit 7e3c2c4897
4 changed files with 34 additions and 0 deletions

View File

View File

View File

@ -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,

View File

@ -471,6 +471,13 @@ public:
ComputeGaussian6HBlurShader();
};
class ComputeShadowBlurHShader : public ShaderHelperSingleton<ComputeShadowBlurHShader, core::vector2df, float>, public TextureRead<Bilinear_Clamped_Filtered>
{
public:
GLuint TU_dest;
ComputeShadowBlurHShader();
};
class Gaussian6HBlurShader : public ShaderHelperSingleton<Gaussian6HBlurShader, core::vector2df, float>, public TextureRead<Bilinear_Clamped_Filtered>
{
public:
@ -510,6 +517,13 @@ public:
ComputeGaussian6VBlurShader();
};
class ComputeShadowBlurVShader : public ShaderHelperSingleton<ComputeShadowBlurVShader, core::vector2df, float>, public TextureRead<Bilinear_Clamped_Filtered>
{
public:
GLuint TU_dest;
ComputeShadowBlurVShader();
};
class Gaussian6VBlurShader : public ShaderHelperSingleton<Gaussian6VBlurShader, core::vector2df, float>, public TextureRead<Bilinear_Clamped_Filtered>
{
public: