pub struct ColorTargetState {
pub format: GpuTextureFormat,
pub blend: Option<BlendState>,
pub write_mask: u32,
}Expand description
One entry of a fragment stage’s targets array: the format of that
color attachment and how fragments write into it.
Fields§
§format: GpuTextureFormatThe format of the color attachment this target writes to. It must match the attachment’s own format.
blend: Option<BlendState>The blend to apply, or None to overwrite the target with the
fragment’s color.
write_mask: u32Which channels the fragment stage may write, as a bitmask:
0x1 red, 0x2 green, 0x4 blue, 0x8 alpha. All four channels
is 0xf; 0xf is the right value for almost every opaque
fragment.
Implementations§
Source§impl ColorTargetState
Named constructors for the pipeline state structs, whose derived
new skips every field and therefore takes no arguments.
impl ColorTargetState
Named constructors for the pipeline state structs, whose derived
new skips every field and therefore takes no arguments.
Each constructor takes the fields that actually vary in practice and
derives the rest from the type’s Default; the ones left out are
mutated through the lombok setters afterwards.