Enum wgpu::BlendFactor
source · [−]#[repr(C)]
pub enum BlendFactor {
Show 13 variants
Zero,
One,
Src,
OneMinusSrc,
SrcAlpha,
OneMinusSrcAlpha,
Dst,
OneMinusDst,
DstAlpha,
OneMinusDstAlpha,
SrcAlphaSaturated,
Constant,
OneMinusConstant,
}
Expand description
Alpha blend factor.
Alpha blending is very complicated: see the OpenGL or Vulkan spec for more information.
Corresponds to WebGPU GPUBlendFactor
.
Variants
Zero
0.0
One
1.0
Src
S.component
OneMinusSrc
1.0 - S.component
SrcAlpha
S.alpha
OneMinusSrcAlpha
1.0 - S.alpha
Dst
D.component
OneMinusDst
1.0 - D.component
DstAlpha
D.alpha
OneMinusDstAlpha
1.0 - D.alpha
SrcAlphaSaturated
min(S.alpha, 1.0 - D.alpha)
Constant
Constant
OneMinusConstant
1.0 - Constant
Trait Implementations
sourceimpl Clone for BlendFactor
impl Clone for BlendFactor
sourcefn clone(&self) -> BlendFactor
fn clone(&self) -> BlendFactor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BlendFactor
impl Debug for BlendFactor
sourceimpl<'de> Deserialize<'de> for BlendFactor
impl<'de> Deserialize<'de> for BlendFactor
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<BlendFactor, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<BlendFactor, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for BlendFactor
impl Hash for BlendFactor
sourceimpl PartialEq<BlendFactor> for BlendFactor
impl PartialEq<BlendFactor> for BlendFactor
sourceimpl Serialize for BlendFactor
impl Serialize for BlendFactor
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for BlendFactor
impl Eq for BlendFactor
impl StructuralEq for BlendFactor
impl StructuralPartialEq for BlendFactor
Auto Trait Implementations
impl RefUnwindSafe for BlendFactor
impl Send for BlendFactor
impl Sync for BlendFactor
impl Unpin for BlendFactor
impl UnwindSafe for BlendFactor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.