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