Struct grr::Shader

source ·
#[repr(transparent)]
pub struct Shader(_);
Expand description

Shader.

Shaders are programmable parts of Pipelines. Each shader has a fixed ShaderStage in the pipeline. Shaders may be reused in different pipelines and specify the operations which will transform a predefined set of inputs into a set of output variables. The shader stages defines the input and output layout.

Beside the input and output variables, shaders can also access GPU memory via bound buffers and images.

Shading Lanuage

OpenGL comes with an defined Shading Language (GLSL), which will be also used in the documentation for writing shaders. The OpenGL drivers will translate the GLSL shaders into IHV specific machine language via an built-in compiler. Beside the shader representation in text form (GLSL) with GL 4.6 comes also support for the binary SPIR-V format.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.