1 #ifndef MSP_GL_POSTPROCESSOR_H_
2 #define MSP_GL_POSTPROCESSOR_H_
13 Base class for post-processing effects. Post-processors receive the contents
14 of the entire framebuffer as a texture and render it back, altering it in the
22 virtual ~PostProcessor() { }
24 /// Renders the effect.
25 virtual void render(const Texture2D &, const Texture2D &) { }
27 virtual void render(Renderer &, const Texture2D &, const Texture2D &);
30 /** Returns a vertex shader suitable for rendering a full-screen quad.
31 Input vertices are assumed to be in normalized device coordinates; no
32 transform is performed. The shader provides a varying vec2 texcoord for
33 a fragment shader to access textures.
35 Deprecated in favor of the builtin postprocess.glsl module. */
36 static Shader &get_fullscreen_vertex_shader();
38 /** Returns a mesh consisting of a single quad, covering the entire screen.
39 The vertices are in normalized device coordinates. */
40 static const Mesh &get_fullscreen_quad();
43 static const Mesh &create_fullscreen_quad();