Clean bloomblending since it's not used anymore

This commit is contained in:
Vincent Lejeune 2015-02-23 22:11:57 +01:00
parent 06f0188a5b
commit 2206f8ad5c
4 changed files with 3 additions and 36 deletions

View File

@ -1,14 +0,0 @@
uniform sampler2D tex_128;
uniform sampler2D tex_256;
uniform sampler2D tex_512;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy / screen;
vec4 col = .125 * texture(tex_128, uv);
col += .25 * texture(tex_256, uv);
col += .5 * texture(tex_512, uv);
FragColor = vec4(col.xyz, 1.);
}

View File

@ -754,7 +754,7 @@ FrameBuffer *PostProcessing::render(scene::ICameraSceneNode * const camnode, boo
glBlendFunc(GL_ONE, GL_ONE);
glBlendEquation(GL_FUNC_ADD);
renderGaussian6Blur(irr_driver->getFBO(FBO_BLOOM_128), irr_driver->getFBO(FBO_TMP_128), 1., 1.);
renderGaussian6Blur(irr_driver->getFBO(FBO_BLOOM_128), irr_driver->getFBO(FBO_TMP_128), 2., 2.);
glEnable(GL_BLEND);
irr_driver->getFBO(FBO_BLOOM_256).Bind();
renderPassThrough(irr_driver->getFBO(FBO_BLOOM_128).getRTT()[0], 256, 256);
@ -771,15 +771,12 @@ FrameBuffer *PostProcessing::render(scene::ICameraSceneNode * const camnode, boo
glDisable(GL_BLEND);
renderGaussian6Blur(irr_driver->getFBO(FBO_BLOOM_1024), irr_driver->getFBO(FBO_TMP_1024), 2., 2.);
// Additively blend on top of tmp1
// Additively blend
in_fbo->Bind();
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glBlendEquation(GL_FUNC_ADD);
FullScreenShader::BloomBlendShader::getInstance()->SetTextureUnits(
irr_driver->getRenderTargetTexture(RTT_BLOOM_128), irr_driver->getRenderTargetTexture(RTT_BLOOM_256), irr_driver->getRenderTargetTexture(RTT_BLOOM_512));
DrawFullScreenEffect<FullScreenShader::BloomBlendShader>();
renderPassThrough(irr_driver->getRenderTargetTexture(RTT_BLOOM_1024), in_fbo->getWidth(), in_fbo->getHeight());
glDisable(GL_BLEND);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
} // end if bloom

View File

@ -1570,16 +1570,6 @@ namespace FullScreenShader
AssignSamplerNames(Program, 0, "tex");
}
BloomBlendShader::BloomBlendShader()
{
Program = LoadProgram(OBJECT,
GL_VERTEX_SHADER, file_manager->getAsset("shaders/screenquad.vert").c_str(),
GL_FRAGMENT_SHADER, file_manager->getAsset("shaders/bloomblend.frag").c_str());
AssignUniforms();
AssignSamplerNames(Program, 0, "tex_128", 1, "tex_256", 2, "tex_512");
}
LensBlendShader::LensBlendShader()
{

View File

@ -388,12 +388,6 @@ public:
BloomShader();
};
class BloomBlendShader : public ShaderHelperSingleton<BloomBlendShader>, public TextureRead<Bilinear_Filtered, Bilinear_Filtered, Bilinear_Filtered>
{
public:
BloomBlendShader();
};
class LensBlendShader : public ShaderHelperSingleton<LensBlendShader>, public TextureRead<Bilinear_Filtered, Bilinear_Filtered, Bilinear_Filtered>
{
public: