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
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.
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:
-
Blending state for each attachment. If
None
then fragment’s output color is written unmodified. -
Bitmask that specifies components that will be written to the attachment.
Color and alpha of all attachments should be blended in specified way.
Trait Implementations§
source§impl Clone for ColorBlend
impl Clone for ColorBlend
source§fn clone(&self) -> ColorBlend
fn clone(&self) -> ColorBlend
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more