pub struct LutBlender {
pub dirty: bool,
/* private fields */
}Expand description
Smoothly interpolates between LUTs when game state changes.
Fields§
§dirty: boolWhether the blended LUT needs re-upload to GPU.
Implementations§
Source§impl LutBlender
impl LutBlender
pub fn new(initial: Lut3D) -> Self
Sourcepub fn blend_to(&mut self, target: Lut3D, duration: f32)
pub fn blend_to(&mut self, target: Lut3D, duration: f32)
Start blending toward a new LUT over duration seconds.
Sourcepub fn is_blending(&self) -> bool
pub fn is_blending(&self) -> bool
Whether a blend is currently in progress.
Sourcepub fn blend_progress(&self) -> f32
pub fn blend_progress(&self) -> f32
Current blend progress (0.0 to 1.0).
Sourcepub fn current_lut(&self) -> &Lut3D
pub fn current_lut(&self) -> &Lut3D
Get the current (possibly blended) LUT.
Sourcepub fn take_dirty(&mut self) -> bool
pub fn take_dirty(&mut self) -> bool
Consume the dirty flag. Returns true if the LUT needs re-upload.
Auto Trait Implementations§
impl Freeze for LutBlender
impl RefUnwindSafe for LutBlender
impl Send for LutBlender
impl Sync for LutBlender
impl Unpin for LutBlender
impl UnsafeUnpin for LutBlender
impl UnwindSafe for LutBlender
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> 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.