pub enum Type {
Show 20 variants
Void,
Bool,
F32,
I32,
U32,
Vec2,
Vec3,
Vec4,
UVec2,
IVec2,
UVec3,
UVec4,
IVec3,
IVec4,
BVec2,
BVec3,
BVec4,
Mat2,
Mat3,
Mat4,
}Expand description
A WGSL value type. Three carries these as strings ('vec3'); the closed set
is the part of NodeBuilder’s type vocabulary the ladder has reached.
Variants§
Void
No value — a statement’s type, or a fn with no return.
Bool
bool.
F32
f32.
I32
i32.
U32
u32.
Vec2
vec2<f32>.
Vec3
vec3<f32>.
Vec4
vec4<f32>.
UVec2
vec2<u32>.
IVec2
vec2<i32>.
UVec3
vec3<u32> — MaterialX’s mx_hash_vec3 packs its three byte hashes
into one.
UVec4
vec4<u32> — the skinIndex attribute, which three.js declares
attribute( 'skinIndex', 'uvec4' ) and uploads as a Uint32Array.
IVec3
vec3<i32> / vec4<i32> — TSL’s ivec3() / ivec4().
IVec4
vec4<i32> — TSL’s ivec4().
BVec2
vec2<bool> / vec3<bool> / vec4<bool> — TSL’s bvec2() … bvec4(),
and what a component-wise comparison of two vectors is.
BVec3
vec3<bool>.
BVec4
vec4<bool>.
Mat2
mat2 — RotateNode’s vec2 path emits mat2x2<f32>( cos, sin, -sin, cos ).
Mat3
mat3x3<f32>.
Mat4
mat4x4<f32>.
Implementations§
Trait Implementations§
impl Copy for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.