From 702de88f837584fd046d787f7199e4560ceda9c4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 6 Jan 2017 18:15:43 +0200 Subject: [PATCH] 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. --- source/ambientocclusion.cpp | 1 + 1 file changed, 1 insertion(+) 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; -- 2.45.2