Trait CanShade

Source
pub trait CanShade {
    // Required method
    fn shade(&mut self, pixel: Pixel) -> Pixel;
}
Expand description

To write a shader you must have a struct that implements this shader

Required Methods§

Source

fn shade(&mut self, pixel: Pixel) -> Pixel

This function accepts a pixel and returns the adjusted pixel, as you wish to adjust it

Implementors§