pub struct PostStack { /* private fields */ }Expand description
Ordered post-processing stack with cached GPU resources.
Implementations§
Source§impl PostStack
impl PostStack
Sourcepub fn effects(&self) -> &[PostEffect]
pub fn effects(&self) -> &[PostEffect]
Returns the ordered effects.
Sourcepub fn with_bloom(self, config: BloomConfig) -> Self
pub fn with_bloom(self, config: BloomConfig) -> Self
Adds a bloom pass.
Sourcepub fn with_ssao(self, config: SsaoConfig) -> Self
pub fn with_ssao(self, config: SsaoConfig) -> Self
Adds an SSAO pass.
Sourcepub fn with_tonemap(self, mapper: ToneMapper) -> Self
pub fn with_tonemap(self, mapper: ToneMapper) -> Self
Adds a tone mapping pass.
Sourcepub fn with_fxaa(self, config: FxaaConfig) -> Self
pub fn with_fxaa(self, config: FxaaConfig) -> Self
Adds an FXAA pass.
Sourcepub fn with_smaa(self, config: SmaaConfig) -> Self
pub fn with_smaa(self, config: SmaaConfig) -> Self
Adds an SMAA pass.
Sourcepub fn with_fog(self, config: FogPostConfig) -> Self
pub fn with_fog(self, config: FogPostConfig) -> Self
Adds a fog blend pass.
Sourcepub fn with_outline(self, config: OutlineConfig) -> Self
pub fn with_outline(self, config: OutlineConfig) -> Self
Adds an outline pass.
Sourcepub fn with_motion_blur(self, config: MotionBlurConfig) -> Self
pub fn with_motion_blur(self, config: MotionBlurConfig) -> Self
Adds a motion blur pass.
Sourcepub fn remove(&mut self, index: usize) -> Option<PostEffect>
pub fn remove(&mut self, index: usize) -> Option<PostEffect>
Removes an effect by index.
Sourcepub fn apply_to_view(
&mut self,
device: &Device,
queue: &Queue,
source: &TextureView,
output: &TextureView,
context: PostContext,
) -> Result<PostStats, ScenixError>
pub fn apply_to_view( &mut self, device: &Device, queue: &Queue, source: &TextureView, output: &TextureView, context: PostContext, ) -> Result<PostStats, ScenixError>
Applies the stack from source to output and submits a GPU command buffer.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PostStack
impl !UnwindSafe for PostStack
impl Freeze for PostStack
impl Send for PostStack
impl Sync for PostStack
impl Unpin for PostStack
impl UnsafeUnpin for PostStack
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