pub trait Filter: Send + Sync {
// Required methods
fn passes(&self) -> u32;
fn render_pass(
&self,
ctx: &mut FilterContext<'_>,
input: &RenderTexture,
output: &RenderTexture,
pass: u32,
);
}Expand description
A renderable post-process filter applied to a RenderTexture.
Required Methods§
Sourcefn passes(&self) -> u32
fn passes(&self) -> u32
Number of passes (>= 1). Multi-pass filters ping-pong between two
render targets across the orchestrator.
Sourcefn render_pass(
&self,
ctx: &mut FilterContext<'_>,
input: &RenderTexture,
output: &RenderTexture,
pass: u32,
)
fn render_pass( &self, ctx: &mut FilterContext<'_>, input: &RenderTexture, output: &RenderTexture, pass: u32, )
Render one pass: read from input, write to output. The orchestrator
invokes this once per pass index [0, passes()).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".