Struct vulkano::pipeline::graphics::color_blend::ColorBlendState [−][src]
pub struct ColorBlendState {
pub logic_op: Option<StateMode<LogicOp>>,
pub attachments: Vec<ColorBlendAttachmentState>,
pub blend_constants: StateMode<[f32; 4]>,
}
Expand description
Describes how the color output of the fragment shader is written to the attachment. See the
documentation of the blend
module for more info.
Fields
logic_op: Option<StateMode<LogicOp>>
Sets the logical operation to perform between the incoming fragment color and the existing fragment in the framebuffer attachment.
If set to Some
, the logic_op
feature must be
enabled on the device. If set to Some(Dynamic)
, then the
extended_dynamic_state2
feature must also be enabled on the device.
attachments: Vec<ColorBlendAttachmentState>
Sets the blend and output state for each color attachment. The number of elements must match the number of color attachments in the framebuffer.
If there are multiple elements, and the blend
and color_write_mask
members of each
element differ, then the independent_blend
feature must be enabled on the device.
blend_constants: StateMode<[f32; 4]>
The constant color to use for some of the BlendFactor
variants.
Implementations
Creates a ColorBlendState
with logical operations disabled, blend constants set to zero,
and num
attachment entries that have blending disabled, and color write and all color
components enabled.
Enables logical operations with the given logical operation.
Enables logical operations with a dynamic logical operation.
Enables blending for all attachments, with the given parameters.
Enables blending for all attachments, with alpha blending.
Enables blending for all attachments, with additive blending.
Sets the color write mask for all attachments.
Sets the blend constants.
Sets the blend constants as dynamic.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ColorBlendState
impl Send for ColorBlendState
impl Sync for ColorBlendState
impl Unpin for ColorBlendState
impl UnwindSafe for ColorBlendState
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.