#[repr(C)]pub struct BlendState {
pub color: BlendComponent,
pub alpha: BlendComponent,
}
Expand description
Describe the blend state of a render pipeline,
within ColorTargetState
.
See the OpenGL or Vulkan spec for more information.
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 Hash for BlendState
impl Hash for BlendState
Source§impl PartialEq for BlendState
impl PartialEq 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
)