]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.cpp
Improve the ambient occlusion algorithm
[libs/gl.git] / source / pipeline.cpp
index 63bdc4e84bbf82f10b883ade20f7d89c6216bc12..5294ffbd859d84f4c29ce7878dcd5a01a6fd376b 100644 (file)
@@ -120,12 +120,14 @@ void Pipeline::add_postprocessor(PostProcessor &pp)
                color_buf = new Texture2D;
                color_buf->set_min_filter(NEAREST);
                color_buf->set_mag_filter(NEAREST);
+               color_buf->set_wrap(CLAMP_TO_EDGE);
                color_buf->storage((hdr ? RGB16F : RGB), width, height);
                fbo->attach(COLOR_ATTACHMENT0, *color_buf, 0);
 
                depth_buf = new Texture2D;
                depth_buf->set_min_filter(NEAREST);
                depth_buf->set_mag_filter(NEAREST);
+               depth_buf->set_wrap(CLAMP_TO_EDGE);
                depth_buf->storage(DEPTH_COMPONENT, width, height);
                fbo->attach(DEPTH_ATTACHMENT, *depth_buf, 0);
        }