pub trait Postprocessor {
type T;
// Required methods
fn target(&self) -> &Texture;
fn draw(&self, renderer: &Renderer, args: &Self::T);
// Provided method
fn process(&self, renderer: &Renderer, args: &Self::T) { ... }
}
Expand description
A custom postprocessor.
Postprocessing happens in three steps:
- first,
target()
is invoked and expected to return an input texture target (to which the user will draw the input data to be postprocessed). process()
is invoked. Any drawing operations performed within will target the input texture.draw()
is invoked. Any drawing operations performed within will target the destination defined by the user.