#[repr(C)]pub struct BlendState {
pub color: BlendComponent,
pub alpha: BlendComponent,
}
Expand description
Describe the blend state of a render pipeline,
within ColorTargetState
.
Corresponds to WebGPU GPUBlendState
.
Fields§
§color: BlendComponent
Color equation.
alpha: BlendComponent
Alpha equation.
Implementations§
Source§impl BlendState
impl BlendState
Sourcepub const REPLACE: Self = _
pub const REPLACE: Self = _
Blend mode that does no color blending, just overwrites the output with the contents of the shader.
Sourcepub const ALPHA_BLENDING: Self = _
pub const ALPHA_BLENDING: Self = _
Blend mode that does standard alpha blending with non-premultiplied alpha.
Sourcepub const PREMULTIPLIED_ALPHA_BLENDING: Self = _
pub const PREMULTIPLIED_ALPHA_BLENDING: Self = _
Blend mode that does standard alpha blending with premultiplied alpha.
Trait Implementations§
Source§impl Clone for BlendState
impl Clone for BlendState
Source§fn clone(&self) -> BlendState
fn clone(&self) -> BlendState
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 moreSource§impl Debug for BlendState
impl Debug for BlendState
Source§impl<'de> Deserialize<'de> for BlendState
impl<'de> Deserialize<'de> for BlendState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for BlendState
impl Hash for BlendState
Source§impl PartialEq for BlendState
impl PartialEq for BlendState
Source§impl Serialize for BlendState
impl Serialize for BlendState
impl Copy for BlendState
impl Eq for BlendState
impl StructuralPartialEq for BlendState
Auto Trait Implementations§
impl Freeze for BlendState
impl RefUnwindSafe for BlendState
impl Send for BlendState
impl Sync for BlendState
impl Unpin for BlendState
impl UnwindSafe for BlendState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)