Expand description
This library provides types and functions which are used by the Rust code generated by
naga_rust_back
or naga_rust_embed
. These types and functions implement vector arithmetic
in the style expected by shader code, which differs from straightforward Rust in various ways.
This library currently does not have a clean public API distinct from the API provided for the benefit of the code generator. Expect changes in future versions.
Structs§
- Scalar
- This type wraps an underlying Rust-native scalar (or someday SIMD) type
to provide only methods and operators which are compatible with shader
function behaviors. That is, they act like
Vec*
even whereT
might not. This allows the code generator to not worry as much about mismatches between Rust and shader semantics. - Vec2
- Vec3
- Vec4
Functions§
Attribute Macros§
- compute
- Returns the input unchanged.
- fragment
- Returns the input unchanged.
- vertex
- Returns the input unchanged.
- workgroup_
size - Returns the input unchanged.