From 41ff7da7975834536438b29b31f8663c216acb99 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sat, 12 May 2012 23:38:00 +0200 Subject: [PATCH] Show bloom buffer --- Effects/display.eff | 10 ++++++++++ Shaders/display.frag | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Effects/display.eff b/Effects/display.eff index a6af6c4ee..fb7c22650 100644 --- a/Effects/display.eff +++ b/Effects/display.eff @@ -43,6 +43,11 @@ buffer bloom-3 + + 6 + buffer + ao-3 + Shaders/fullscreen.vert Shaders/display.frag @@ -77,6 +82,11 @@ sampler-2d 5 + + ao_tex + sampler-2d + 6 + exposure float diff --git a/Shaders/display.frag b/Shaders/display.frag index 4bd6b7aa2..3d4db7c2c 100644 --- a/Shaders/display.frag +++ b/Shaders/display.frag @@ -31,8 +31,8 @@ void main() { color = texture2D( color_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 ); } else if (coords.x < 0.2 && coords.y >= 0.8 && fg_DepthInColor) { color = texture2D( depth_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 ); - } else if (coords.x < 0.2 && coords.y >= 0.8 && ambientOcclusion) { - color = texture2D( ao_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 ); + } else if (coords.x < 0.2 && coords.y >= 0.8 && bloomEnabled) { + color = texture2D( bloom_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 ); } else { color = texture2D( lighting_tex, coords ); if (bloomEnabled)