pub struct BlendMode {
    pub blend_enable: bool,
    pub src_color_blend_factor: BlendFactor,
    pub dst_color_blend_factor: BlendFactor,
    pub color_blend_op: BlendOp,
    pub src_alpha_blend_factor: BlendFactor,
    pub dst_alpha_blend_factor: BlendFactor,
    pub alpha_blend_op: BlendOp,
    pub color_write_mask: ColorComponentFlags,
}
Expand description

Specifies color blend state used when rasterization is enabled for any color attachments accessed during rendering.

See VkPipelineColorBlendAttachmentState.

Fields

blend_enable: bool

Controls whether blending is enabled for the corresponding color attachment.

If blending is not enabled, the source fragment’s color for that attachment is passed through unmodified.

src_color_blend_factor: BlendFactor

Selects which blend factor is used to determine the source factors.

dst_color_blend_factor: BlendFactor

Selects which blend factor is used to determine the destination factors.

color_blend_op: BlendOp

Selects which blend operation is used to calculate the RGB values to write to the color attachment.

src_alpha_blend_factor: BlendFactor

Selects which blend factor is used to determine the source factor.

dst_alpha_blend_factor: BlendFactor

Selects which blend factor is used to determine the destination factor.

alpha_blend_op: BlendOp

Selects which blend operation is used to calculate the alpha values to write to the color attachment.

color_write_mask: ColorComponentFlags

A bitmask of specifying which of the R, G, B, and/or A components are enabled for writing, as described for the Color Write Mask.

Implementations

A commonly used blend mode for replacing color attachment values with new ones.

A commonly used blend mode for blending color attachment values based on the alpha channel.

A commonly used blend mode for blending color attachment values based on the alpha channel, where the color components have been pre-multiplied with the alpha component value.

Specifies a default blend mode which is not enabled.

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 !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

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.