]> git.tdb.fi Git - libs/gl.git/commitdiff
Use linear filtering when rendering bloom
authorMikko Rasa <tdb@tdb.fi>
Mon, 17 Jun 2019 20:25:49 +0000 (23:25 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 17 Jun 2019 20:25:49 +0000 (23:25 +0300)
This postprocessor is often rendered at a reduced resolution, and nearest
filtering causes the output to appear blocky.

source/bloom.cpp

index e00fd0e149bc0c8bc5ad9c74d0a13522c2124d76..6484d052fdb2691b80747cd3965bc2925a799517 100644 (file)
@@ -23,6 +23,7 @@ Bloom::Bloom(unsigned w, unsigned h):
 
        for(unsigned i=0; i<2; ++i)
                target[i] = new RenderTarget(w, h, (RENDER_COLOR,RGB16F));
+       target[1]->set_texture_filter(LINEAR);
 
        common_shdata.uniform("source", 0);
        common_shdata.uniform("blurred", 1);