3 This file is part of libmspgl
4 Copyright © 2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_AMBIENTOCCLUSION_H_
9 #define MSP_GL_AMBIENTOCCLUSION_H_
11 #include "framebuffer.h"
13 #include "postprocessor.h"
15 #include "programdata.h"
16 #include "texture2d.h"
17 #include "texturing.h"
23 Implements screen-space ambient occlusion.
25 http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion
27 class AmbientOcclusion: public PostProcessor
31 Texture2D rotate_lookup;
33 Texturing occlude_texturing;
34 Program occlude_shader;
35 ProgramData occlude_shdata;
36 Texturing combine_texturing;
37 Program combine_shader;
38 ProgramData combine_shdata;
42 AmbientOcclusion(unsigned, unsigned, float);
44 void set_depth_ratio(float);
45 void set_darkness(float);
47 virtual void render(const Texture2D &, const Texture2D &);