pub struct PassContext {
pub pass_name: String,
pub pass_index: usize,
pub frame_index: u64,
pub backbuffer_width: u32,
pub backbuffer_height: u32,
pub delta_time: f32,
pub inputs: Vec<(ResourceHandle, String)>,
pub outputs: Vec<(ResourceHandle, String)>,
pub render_width: u32,
pub render_height: u32,
}Expand description
Context provided to each pass during execution. Gives access to input and output resources, resolution info, and pass metadata.
Fields§
§pass_name: String§pass_index: usize§frame_index: u64§backbuffer_width: u32§backbuffer_height: u32§delta_time: f32§inputs: Vec<(ResourceHandle, String)>Input resource handles and names.
outputs: Vec<(ResourceHandle, String)>Output resource handles and names.
render_width: u32Effective resolution for this pass (after applying resolution scale).
render_height: u32Implementations§
Source§impl PassContext
impl PassContext
Sourcepub fn input(&self, name: &str) -> Option<ResourceHandle>
pub fn input(&self, name: &str) -> Option<ResourceHandle>
Find an input resource by name.
Sourcepub fn output(&self, name: &str) -> Option<ResourceHandle>
pub fn output(&self, name: &str) -> Option<ResourceHandle>
Find an output resource by name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PassContext
impl RefUnwindSafe for PassContext
impl Send for PassContext
impl Sync for PassContext
impl Unpin for PassContext
impl UnsafeUnpin for PassContext
impl UnwindSafe for PassContext
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.