Module shader

Module shader 

Source
Expand description

Fragment and vertex shaders.

Shaders are functions that are used to customize vertex and fragment handling during rendering.

A vertex shader is responsible for transforming and projecting each vertex in the rendered geometry, usually using a modelview matrix to move the vertex to the view (camera) space and a projection matrix to transform it to the clip space. Vertex shaders can also perform any other per-vertex calculations and pass on the results as attributes of the output vertex.

A fragment shader is used to compute the color of each individual pixel, or fragment, drawn to the render target. The fragment shader receives as input any vertex attributes interpolated across the primitive being rasterized, such as color, texture coordinate, or normal vector.

Structs§

Shader
A type that composes a vertex and a fragment shader.

Traits§

FragmentShader
Trait for fragment shaders, used to compute the color of each individual pixel, or fragment, rendered.
VertexShader
Trait for vertex shaders, used to transform vertices and perform other per-vertex computations.

Functions§

new