Enum vulkano::pipeline::graphics::color_blend::BlendFactor
source · [−]#[repr(i32)]
pub enum BlendFactor {
Show 19 variants
Zero,
One,
SrcColor,
OneMinusSrcColor,
DstColor,
OneMinusDstColor,
SrcAlpha,
OneMinusSrcAlpha,
DstAlpha,
OneMinusDstAlpha,
ConstantColor,
OneMinusConstantColor,
ConstantAlpha,
OneMinusConstantAlpha,
SrcAlphaSaturate,
Src1Color,
OneMinusSrc1Color,
Src1Alpha,
OneMinusSrc1Alpha,
}
Expand description
The operation that takes source
(output from the fragment shader), destination
(value
currently in the framebuffer attachment) and blend_constant
input values,
and produces new inputs to be fed to BlendOp
.
Some operations take source1
as an input, representing the second source value. The
dual_src_blend
feature must be enabled on the
device when these are used.
Variants
Zero
Always 0
.
One
Always 1
.
SrcColor
source
component-wise.
OneMinusSrcColor
1 - source
component-wise.
DstColor
destination
component-wise.
OneMinusDstColor
1 - destination
component-wise.
SrcAlpha
source.a
for all components.
OneMinusSrcAlpha
1 - source.a
for all components.
DstAlpha
destination.a
for all components.
OneMinusDstAlpha
1 - destination.a
for all components.
ConstantColor
blend_constants
component-wise.
OneMinusConstantColor
1 - blend_constants
component-wise.
ConstantAlpha
blend_constants.a
for all components.
OneMinusConstantAlpha
1 - blend_constants.a
for all components.
SrcAlphaSaturate
For the alpha component, always 1
. For the color components,
min(source.a, 1 - destination.a)
for all components.
Src1Color
source1
component-wise.
OneMinusSrc1Color
1 - source1
component-wise.
Src1Alpha
source1.a
for all components.
OneMinusSrc1Alpha
1 - source1.a
for all components.
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 From<BlendFactor> for BlendFactor
impl From<BlendFactor> for BlendFactor
sourcefn from(val: BlendFactor) -> Self
fn from(val: BlendFactor) -> Self
Performs the conversion.
sourceimpl PartialEq<BlendFactor> for BlendFactor
impl PartialEq<BlendFactor> for BlendFactor
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more