pub struct BackdropFilterPipeline {
pub ping_texture: GpuTextureHandle,
pub pong_texture: GpuTextureHandle,
pub width: u32,
pub height: u32,
}Expand description
Hardware-accelerated backdrop blur pipeline managing ping-pong render targets.
Fields§
§ping_texture: GpuTextureHandle§pong_texture: GpuTextureHandle§width: u32§height: u32Implementations§
Source§impl BackdropFilterPipeline
impl BackdropFilterPipeline
Sourcepub fn new(device: &GpuDevice, width: u32, height: u32) -> Self
pub fn new(device: &GpuDevice, width: u32, height: u32) -> Self
Creates a new backdrop blur pipeline with ping-pong textures of the specified dimensions.
Sourcepub fn execute_blur(
&mut self,
device: &mut GpuDevice,
source_texture_id: u64,
radius: f32,
region: Option<Rect>,
)
pub fn execute_blur( &mut self, device: &mut GpuDevice, source_texture_id: u64, radius: f32, region: Option<Rect>, )
Executes a hardware separable Gaussian blur pass with the specified pixel radius.
Sourcepub fn resize(&mut self, device: &GpuDevice, width: u32, height: u32)
pub fn resize(&mut self, device: &GpuDevice, width: u32, height: u32)
Resizes the ping-pong blur textures when the viewport changes.
Sourcepub fn apply_software_blur(
&self,
buffer: &mut FrameBuffer,
region: Rect,
radius: f32,
)
pub fn apply_software_blur( &self, buffer: &mut FrameBuffer, region: Rect, radius: f32, )
Software fallback Gaussian blur applied directly to a FrameBuffer region.
Auto Trait Implementations§
impl Forget for BackdropFilterPipeline
impl Freeze for BackdropFilterPipeline
impl Move for BackdropFilterPipeline
impl RefUnwindSafe for BackdropFilterPipeline
impl Send for BackdropFilterPipeline
impl Sync for BackdropFilterPipeline
impl Unpin for BackdropFilterPipeline
impl UnsafeUnpin for BackdropFilterPipeline
impl UnwindSafe for BackdropFilterPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more