Enum sierra::ColorBlend

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

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

Variants§

§

Logic

Fields

§op: LogicOp

Logical operations to be applied.

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

§

Blending

Fields

§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<[f32; 4]>

Constants for certain blending factors.

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

§

IndependentBlending

Fields

§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<[f32; 4]>

Constants for certain blending factors.

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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Checks if this value is equivalent to the given key. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.