pub enum LinearBlendingFactor {
Show 19 variants
Zero,
One,
SourceColor,
OneMinusSourceColor,
DestinationColor,
OneMinusDestinationColor,
SourceAlpha,
SourceAlphaSaturate,
OneMinusSourceAlpha,
DestinationAlpha,
OneMinusDestinationAlpha,
ConstantColor,
OneMinusConstantColor,
ConstantAlpha,
OneMinusConstantAlpha,
SourceOneColor,
OneMinusSourceOneColor,
SourceOneAlpha,
OneMinusSourceOneAlpha,
}
Expand description
Indicates which value to multiply each component with.
Variants§
Zero
Multiply the source or destination component by zero, which always
gives 0.0
.
One
Multiply the source or destination component by one, which always gives you the original value.
SourceColor
Multiply the source or destination component by its corresponding value in the source.
If you apply this to the source components, you get the values squared.
OneMinusSourceColor
Equivalent to 1 - SourceColor
.
DestinationColor
Multiply the source or destination component by its corresponding value in the destination.
If you apply this to the destination components, you get the values squared.
OneMinusDestinationColor
Equivalent to 1 - DestinationColor
.
SourceAlpha
Multiply the source or destination component by the alpha value of the source.
SourceAlphaSaturate
Multiply the source or destination component by the smallest value of
SourceAlpha
and 1 - DestinationAlpha
.
OneMinusSourceAlpha
Multiply the source or destination component by 1.0
minus the alpha value of the source.
DestinationAlpha
Multiply the source or destination component by the alpha value of the destination.
OneMinusDestinationAlpha
Multiply the source or destination component by 1.0
minus the alpha value of the
destination.
ConstantColor
Multiply the source or destination component by the corresponding value
in Blend::const_value
.
OneMinusConstantColor
Multiply the source or destination component by 1.0
minus the corresponding
value in Blend::const_value
.
ConstantAlpha
Multiply the source or destination component by the alpha value of Blend::const_value
.
OneMinusConstantAlpha
Multiply the source or destination component by 1.0
minus the alpha value of
Blend::const_value
.
SourceOneColor
Multiply the source or destination component by its corresponding value
in source index one (you need to explicitly specify layout(location=0, index=1)
to bind it in your shader.
This is useful in Dual Source Blending
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_blend_func_extended.txt
OneMinusSourceOneColor
Equivalent to 1 - SourceOneColor
.
SourceOneAlpha
Multiply the source or destination component by the alpha value of source index 1.
OneMinusSourceOneAlpha
Multiply the source or destination component by 1.0
minus the alpha value of source index 1.
Trait Implementations§
source§impl Clone for LinearBlendingFactor
impl Clone for LinearBlendingFactor
source§fn clone(&self) -> LinearBlendingFactor
fn clone(&self) -> LinearBlendingFactor
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LinearBlendingFactor
impl Debug for LinearBlendingFactor
source§impl PartialEq for LinearBlendingFactor
impl PartialEq for LinearBlendingFactor
impl Copy for LinearBlendingFactor
impl Eq for LinearBlendingFactor
impl StructuralPartialEq for LinearBlendingFactor
Auto Trait Implementations§
impl Freeze for LinearBlendingFactor
impl RefUnwindSafe for LinearBlendingFactor
impl Send for LinearBlendingFactor
impl Sync for LinearBlendingFactor
impl Unpin for LinearBlendingFactor
impl UnwindSafe for LinearBlendingFactor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.