pub trait Shader<Uniforms, Space: CoordinateSpace, Pixel>: Send {
// Required method
fn draw(
&self,
surface_coords: &Coordinates<Space>,
uniforms: &Uniforms,
) -> Pixel;
}Expand description
Function type that can provide an RGB color given a location in Virtual space and global rendering state
Required Methods§
Sourcefn draw(
&self,
surface_coords: &Coordinates<Space>,
uniforms: &Uniforms,
) -> Pixel
fn draw( &self, surface_coords: &Coordinates<Space>, uniforms: &Uniforms, ) -> Pixel
Turns a Virtual coordinate into a real pixel color