pub struct SpriteShade<'a> {
pub materials: &'a MaterialTable,
pub material: u8,
pub alpha_mul: u8,
}Expand description
Material context for a translucent sprite draw (TV stage): the global
MaterialTable plus this instance’s uniform material id and per-frame
alpha multiplier. Passed (as Some) to draw_sprite_dense_shaded /
ClipFlipbook::draw_frame_shaded to enable front-to-back
accumulate-and-continue compositing; None (or an all-opaque effective
material) takes the existing first-hit opaque path byte-for-byte.
Fields§
§materials: &'a MaterialTableGlobal voxel-material palette (per-voxel id → opacity + blend mode).
material: u8Uniform material id for every voxel of this sprite whose dense
per-voxel mat array is empty (the TV.1 whole-sprite material).
alpha_mul: u8Per-instance opacity multiplier (255 = unscaled), so an effect can
fade out by cheap per-frame updates without re-uploading the volume.
Trait Implementations§
Source§impl<'a> Clone for SpriteShade<'a>
impl<'a> Clone for SpriteShade<'a>
Source§fn clone(&self) -> SpriteShade<'a>
fn clone(&self) -> SpriteShade<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for SpriteShade<'a>
Auto Trait Implementations§
impl<'a> Freeze for SpriteShade<'a>
impl<'a> RefUnwindSafe for SpriteShade<'a>
impl<'a> Send for SpriteShade<'a>
impl<'a> Sync for SpriteShade<'a>
impl<'a> Unpin for SpriteShade<'a>
impl<'a> UnsafeUnpin for SpriteShade<'a>
impl<'a> UnwindSafe for SpriteShade<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more