Function run_effect_chain

Source
pub fn run_effect_chain(
    device: &Device,
    encoder: &mut CommandEncoder,
    pipelines: &EffectPipelines,
    format: TextureFormat,
    src_view: &TextureView,
    width: u32,
    height: u32,
    effects: &IsolatedEffectChain,
    pass_id: u16,
)
Expand description

Applies blur (if any) in-place on src_view using a transient ping-pong texture.

When several blur effects exist, only the largest strictly positive radius is used. Opacity effects are handled by compositing. A nonpositive or NaN maximum is a no-op. Dimensions are physical pixels; allocation clamps each axis to at least one, while uniforms preserve the supplied values.

ยงExamples

use ailloli_ui_render_wgpu::{effect_chain::{run_effect_chain, EffectPipelines},
    IsolatedEffectChain};
fn run(device: &wgpu::Device, encoder: &mut wgpu::CommandEncoder,
    pipelines: &EffectPipelines, view: &wgpu::TextureView) {
    run_effect_chain(device, encoder, pipelines, wgpu::TextureFormat::Rgba8Unorm,
        view, 32, 32, &IsolatedEffectChain::default(), 0);
}