Enum sierra::ColorBlend[][src]

pub enum ColorBlend {
    Logic {
        op: LogicOp,
    },
    Blending {
        blending: Option<Blending>,
        write_mask: ComponentMask,
        constants: State<[OrderedFloat<f32>; 4]>,
    },
    IndependentBlending {
        blending: Vec<(Option<Blending>, ComponentMask)>,
        constants: State<[OrderedFloat<f32>; 4]>,
    },
}

Defines how color stored in attachment should be blended with color output of fragment shader.

Variants

Logic

Values should be treated as unsigned integers and logic operation perforned. Color format must support logic operations.

Fields of Logic

op: LogicOp

Logical operations to be applied.

Blending

Color and alpha of all attachments should be blended in the same way.

Fields of Blending

blending: Option<Blending>

Blending state. If None then fragment’s output color is written unmodified.

write_mask: ComponentMask

Bitmask that specifies components that will be written to the attachment.

constants: State<[OrderedFloat<f32>; 4]>

Constants for certain blending factors.

IndependentBlending

Color and alpha of all attachments should be blended in specified way.

Fields of IndependentBlending

blending: Vec<(Option<Blending>, ComponentMask)>

A tuple of two states:

  1. Blending state for each attachment. If None then fragment’s output color is written unmodified.

  2. Bitmask that specifies components that will be written to the attachment.

constants: State<[OrderedFloat<f32>; 4]>

Constants for certain blending factors.

Trait Implementations

impl Clone for ColorBlend[src]

impl Debug for ColorBlend[src]

impl Default for ColorBlend[src]

impl Eq for ColorBlend[src]

impl Hash for ColorBlend[src]

impl PartialEq<ColorBlend> for ColorBlend[src]

impl StructuralEq for ColorBlend[src]

impl StructuralPartialEq for ColorBlend[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.