Trait softrender::pixel::Pixel
[−]
[src]
pub trait Pixel: Clone + Copy + Send + Sync { fn empty() -> Self; fn with_alpha(self, alpha: f32) -> Self; fn mul_alpha(self, alpha: f32) -> Self; }
Trait required to distinguish pixel type for use in the framebuffer and fragment shader
Required Methods
fn empty() -> Self
An empty pixel in which values can be accumulated into
fn with_alpha(self, alpha: f32) -> Self
Copy the pixel, but with the given alpha channel value
fn mul_alpha(self, alpha: f32) -> Self
Copy the pixel, but multiply the alpha channel with the given value
Implementors
impl Pixel for RGBAf32Pixel
impl Pixel for Vector4<f32>