pub trait VertexShader<In, Uni> {
type Output;
// Required method
fn shade_vertex(&self, vertex: In, uniform: Uni) -> Self::Output;
}Expand description
Trait for vertex shaders, used to transform vertices and perform other per-vertex computations.
§Type parameters
In: Type of the input vertex.Uni: Type of custom “uniform” (non-vertex-specific) data, such as transform matrices, passed to the shader.
Required Associated Types§
Required Methods§
Sourcefn shade_vertex(&self, vertex: In, uniform: Uni) -> Self::Output
fn shade_vertex(&self, vertex: In, uniform: Uni) -> Self::Output
Transforms vertex and does performs other per-vertex computations
needed, outputting a new vertex of type Self::Output. Custom data
that is not vertex-specific can be passed in the uniform parameter.
§Panics
shade_vertex should never panic.