Enum sierra::BlendFactor[][src]

pub enum BlendFactor {
    Zero,
    One,
    SrcColor,
    OneMinusSrcColor,
    DstColor,
    OneMinusDstColor,
    SrcAlpha,
    OneMinusSrcAlpha,
    DstAlpha,
    OneMinusDstAlpha,
    ConstantColor,
    OneMinusConstantColor,
    ConstantAlpha,
    OneMinusConstantAlpha,
    SrcAlphaSaturate,
}

Defines how blend factor is calculated.

For each variant comment contains an equivalent Rust expression where Rs, Gs, Bs and As are value components from fragment shader’s color output, Rd, Gd, Bd and Ad are value components stored in attachment, and Rc, Gc, Bc and Ac are value components defined in constants.

Variants

Zero

Color: (0.0, 0.0, 0.0) Alpha: 0.0

One

Color: (1.0, 1.0, 1.0) Alpha: 1.0

SrcColor

Color: (Rs, Gs, Bs) Alpha: As

OneMinusSrcColor

Color: (1.0 - Rs, 1.0 - Gs, 1.0 - Bs) Alpha: 1.0 - As

DstColor

Color: (Rd, Gd, Bd) Alpha: Ad

OneMinusDstColor

Color: (1.0 - Rd, 1.0 - Gd, 1.0 - Bd) Alpha: 1.0 - Ad

SrcAlpha

Color: (As, As, As) Alpha: As

OneMinusSrcAlpha

Color: (1.0 - As, 1.0 - As, 1.0 - As) Alpha: 1.0 - As

DstAlpha

Color: (Ad, Ad, Ad) Alpha: Ad

OneMinusDstAlpha

Color: (1.0 - Ad, 1.0 - Ad, 1.0 - Ad) Alpha: 1.0 - Ad

ConstantColor

Color: (Rc, Gc, Bc) Alpha: Ac

OneMinusConstantColor

Color: (1.0 - Rc, 1.0 - Gc, 1.0 - Bc) Alpha: 1.0 - Ac

ConstantAlpha

Color: (Ac, Ac, Ac) Alpha: Ac

OneMinusConstantAlpha

Color: (1.0 - Ac, 1.0 - Ac, 1.0 - Ac) Alpha: 1.0 - Ac

SrcAlphaSaturate

Color: {let f = min(As, 1.0 - Ad); (f,f,f)} Alpha: 1.0

Trait Implementations

impl Clone for BlendFactor[src]

impl Copy for BlendFactor[src]

impl Debug for BlendFactor[src]

impl Eq for BlendFactor[src]

impl Hash for BlendFactor[src]

impl PartialEq<BlendFactor> for BlendFactor[src]

impl StructuralEq for BlendFactor[src]

impl StructuralPartialEq for BlendFactor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.