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]>,
    },
}
Expand description

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.

Show fields

Fields of Logic

op: LogicOp

Logical operations to be applied.

Blending

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

Show fields

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.

Show fields

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

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 ==. Read more

This method tests for !=.

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.