Skip to main content

Filter

Trait Filter 

Source
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§

Source

fn passes(&self) -> u32

Number of passes (>= 1). Multi-pass filters ping-pong between two render targets across the orchestrator.

Source

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".

Implementors§