#ifndef MSP_GL_AMBIENTOCCLUSION_H_
#define MSP_GL_AMBIENTOCCLUSION_H_
-#include "framebuffer.h"
-#include "mesh.h"
#include "postprocessor.h"
-#include "program.h"
#include "programdata.h"
#include "rendertarget.h"
-#include "texture2d.h"
namespace Msp {
namespace GL {
+class Program;
+
/**
-Implements screen-space ambient occlusion.
+Darkens recessed areas of the scene to simulate the occlusion of ambient light.
http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion
*/
Loader(Template &);
};
- unsigned n_samples;
- float occlusion_radius;
- float darkness;
- float edge_depth_threshold;
-
- Template();
+ unsigned n_samples = 16;
+ float occlusion_radius = 0.5f;
+ float darkness = 1.0f;
+ float edge_depth_threshold = 0.1f;
virtual AmbientOcclusion *create(unsigned, unsigned) const;
};
const Sampler &nearest_sampler;
public:
- AmbientOcclusion(unsigned, unsigned, float = 1.0f);
+ AmbientOcclusion(unsigned, unsigned);
private:
static const Texture2D &get_or_create_rotate_lookup();