From: Mikko Rasa Date: Fri, 6 Jan 2017 16:15:43 +0000 (+0200) Subject: Use linear filtering for ambient occlusion render target X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=702de88f837584fd046d787f7199e4560ceda9c4;p=libs%2Fgl.git Use linear filtering for ambient occlusion render target The blurring step samples it exactly between texels so nearest filtering may cause artifacts due to floating point math instability. --- diff --git a/source/ambientocclusion.cpp b/source/ambientocclusion.cpp index af1008b4..5edbf833 100644 --- a/source/ambientocclusion.cpp +++ b/source/ambientocclusion.cpp @@ -17,6 +17,7 @@ AmbientOcclusion::AmbientOcclusion(unsigned w, unsigned h, float): combine_shader("ambientocclusion_combine.glsl"), quad(get_fullscreen_quad()) { + occlude_target.set_texture_filter(LINEAR); texturing.attach(2, occlude_target.get_target_texture(RENDER_COLOR)); unsigned seed = 1;