pub struct Context { /* private fields */ }Expand description
WGPU context for applying various effects
Implementations§
Source§impl Context
impl Context
Sourcepub fn merge_buffers(
&self,
image_size: VoxelSize,
) -> Result<MergeBuffers, BufferSizeError>
pub fn merge_buffers( &self, image_size: VoxelSize, ) -> Result<MergeBuffers, BufferSizeError>
Builds a new set of MergeBuffers for the given image size
Sourcepub fn shade_buffers(
&self,
image_size: ImageSize,
) -> Result<ShadeBuffers, BufferSizeError>
pub fn shade_buffers( &self, image_size: ImageSize, ) -> Result<ShadeBuffers, BufferSizeError>
Builds a new set of ShadeBuffers for the given image size
Sourcepub fn ssao_buffers(
&self,
image_size: VoxelSize,
) -> Result<SsaoBuffers, BufferSizeError>
pub fn ssao_buffers( &self, image_size: VoxelSize, ) -> Result<SsaoBuffers, BufferSizeError>
Builds a new set of SsaoBuffers for the given image size
Sourcepub fn submit_merge(
&self,
images: &[&ImageBuffer<GeomBufferTag>],
denoise: bool,
buf: &mut MergeBuffers,
) -> Result<(), MergeError>
pub fn submit_merge( &self, images: &[&ImageBuffer<GeomBufferTag>], denoise: bool, buf: &mut MergeBuffers, ) -> Result<(), MergeError>
Submits a set of merge operations to combine all of the images
The output buffer is resized to fit the images
If the incoming slice is empty, then no work is submitted
Sourcepub fn submit_shade(
&self,
image: &MergeBuffers,
ssao: Option<&SsaoBuffers>,
buf: &mut ShadeBuffers,
out: Option<&mut ImageReadBuffer<ShadedImageTag>>,
) -> Result<(), ShadeError>
pub fn submit_shade( &self, image: &MergeBuffers, ssao: Option<&SsaoBuffers>, buf: &mut ShadeBuffers, out: Option<&mut ImageReadBuffer<ShadedImageTag>>, ) -> Result<(), ShadeError>
Submits an operation to shade an image
The output buffer is resized to fit the images
Sourcepub fn submit_ssao(
&self,
image: &MergeBuffers,
buf: &mut SsaoBuffers,
) -> Result<(), SsaoError>
pub fn submit_ssao( &self, image: &MergeBuffers, buf: &mut SsaoBuffers, ) -> Result<(), SsaoError>
Submits a pass to compute an SSAO buffer
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Freeze for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.