pub trait UniformValue { }
Expand description

Implemented for types that can be passed as a uniform value to a shader.

As the implementation of this trait currently interacts directly with the platform layer, it cannot be implemented outside of Tetra itself. This may change in the future!

Implementations on Foreign Types

Can be accessed as an int in your shader.

Can be accessed as an array of ints in your shader.

Can be accessed as an array of ints in your shader.

Can be accessed as a uint in your shader.

Can be accessed as an array of uints in your shader.

Can be accessed as an array of uints in your shader.

Can be accessed as a float in your shader.

Can be accessed as an array of floats in your shader.

Can be accessed as an array of floats in your shader.

Can be accessed as a vec2 in your shader.

Can be accessed as an array of vec2s in your shader.

Can be accessed as an array of vec2s in your shader.

Can be accessed as a vec3 in your shader.

Can be accessed as an array of vec3s in your shader.

Can be accessed as an array of vec3s in your shader.

Can be accessed as a vec4 in your shader.

Can be accessed as an array of vec4s in your shader.

Can be accessed as an array of vec4s in your shader.

Can be accessed as a mat2 in your shader.

Can be accessed as an array of mat2s in your shader.

Can be accessed as an array of mat2s in your shader.

Can be accessed as a mat3 in your shader.

Can be accessed as an array of mat3s in your shader.

Can be accessed as an array of mat3s in your shader.

Can be accessed as a mat4 in your shader.

Can be accessed as an array of mat4s in your shader.

Can be accessed as an array of mat4s in your shader.

Can be accessed as an array of vec4s in your shader.

Can be accessed as an array of vec4s in your shader.

Any type that can be passed by value to a shader can also be passed by reference.

Implementors

Can be accessed as a vec4 in your shader.

Can be accessed via a sampler2D in your shader.