1 #ifndef MSP_GL_POSTPROCESSOR_H_
2 #define MSP_GL_POSTPROCESSOR_H_
12 Base class for post-processing effects. Post-processors receive the contents
13 of the entire framebuffer as a texture and render it back, altering it in the
21 virtual ~PostProcessor() { }
23 /// Renders the effect.
24 virtual void render(const Texture2D &color, const Texture2D &depth) = 0;
27 /** Returns a vertex shader suitable for rendering a fullscreen quad. Input
28 vertices are assumed to be in normalized device coordinates; no transform is
29 done. The shader provides a varying vec2 texcoord for fragment a shader to
31 static Shader &get_fullscreen_vertex_shader();
33 /** Returns a mesh consisting of a single quad, covering the entire screen.
34 The vertices are in normalized device coordinates. */
35 static const Mesh &get_fullscreen_quad();
38 static const Mesh &create_fullscreen_quad();