pub struct ScaleNode {
pub width: u32,
pub height: u32,
pub algorithm: ScaleAlgorithm,
/* private fields */
}Expand description
Resample a frame to a target resolution.
In Phase 1 the GPU path renders into the output texture at whatever size
it was allocated — the graph allocates same-size textures, so ScaleNode
acts as a bilinear blit pass. Full dimension-changing support (variable
output texture size) is a Phase 2 addition.
The CPU path is a no-op; use an offline scaler (e.g. image crate) for
CPU-side resizing.
Fields§
§width: u32Target width in pixels (used as metadata; output size depends on the graph).
height: u32Target height in pixels.
algorithm: ScaleAlgorithmSampling algorithm.
Implementations§
Trait Implementations§
Source§impl RenderNode for ScaleNode
Available on crate feature wgpu only.
impl RenderNode for ScaleNode
Available on crate feature
wgpu only.Source§fn process(
&self,
inputs: &[&Texture],
outputs: &[&Texture],
ctx: &RenderContext,
)
fn process( &self, inputs: &[&Texture], outputs: &[&Texture], ctx: &RenderContext, )
Run the GPU render pass. Read more
Source§fn input_count(&self) -> usize
fn input_count(&self) -> usize
Number of input textures required by this node (default: 1).
Source§fn pass_count(&self) -> usize
fn pass_count(&self) -> usize
Number of render passes (default: 1). Multi-pass nodes (e.g. gaussian
blur) return 2 or more.
Auto Trait Implementations§
impl !Freeze for ScaleNode
impl !RefUnwindSafe for ScaleNode
impl !UnwindSafe for ScaleNode
impl Send for ScaleNode
impl Sync for ScaleNode
impl Unpin for ScaleNode
impl UnsafeUnpin for ScaleNode
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