X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fambientocclusion.h;h=419189942fad13e4b48b9223ef09bce0dc214233;hp=e7829c181dce39bce8c74f69a631a56fcc9990b0;hb=HEAD;hpb=9f5f027d1c93e541a12b8e4c04bd25b11edbe132 diff --git a/source/ambientocclusion.h b/source/ambientocclusion.h deleted file mode 100644 index e7829c18..00000000 --- a/source/ambientocclusion.h +++ /dev/null @@ -1,71 +0,0 @@ -#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" -#include "texturing.h" - -namespace Msp { -namespace GL { - -/** -Implements screen-space ambient occlusion. - -http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion -*/ -class AmbientOcclusion: public PostProcessor -{ -public: - struct Template: PostProcessor::Template - { - class Loader: public DataFile::DerivedObjectLoader - { - public: - Loader(Template &); - }; - - unsigned n_samples; - float occlusion_radius; - float darkness; - - Template(); - - virtual AmbientOcclusion *create(unsigned, unsigned) const; - }; - -private: - Texture2D rotate_lookup; - RenderTarget occlude_target; - Texturing texturing; - Program occlude_shader; - Program combine_shader; - mutable ProgramData shdata; - const Mesh &quad; - -public: - AmbientOcclusion(unsigned, unsigned, float = 1.0f); - -private: - static float random(unsigned &); - -public: - void set_n_samples(unsigned); - void set_occlusion_radius(float); - - // Deprecated - void set_depth_ratio(float); - - void set_darkness(float); - - virtual void render(Renderer &, const Texture2D &, const Texture2D &); -}; - -} // namespace GL -} // namespace Msp - -#endif