Enum wgpu_types::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§
source§impl Clone for BlendFactor
impl Clone for BlendFactor
source§fn clone(&self) -> BlendFactor
fn clone(&self) -> BlendFactor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BlendFactor
impl Debug for BlendFactor
source§impl<'de> Deserialize<'de> for BlendFactor
impl<'de> Deserialize<'de> for BlendFactor
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for BlendFactor
impl Hash for BlendFactor
source§impl PartialEq<BlendFactor> for BlendFactor
impl PartialEq<BlendFactor> for BlendFactor
source§fn eq(&self, other: &BlendFactor) -> bool
fn eq(&self, other: &BlendFactor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.