pub trait ShaderSize: ShaderType {
const SHADER_SIZE: NonZeroU64 = _;
}
Expand description
Trait implemented for all WGSL fixed-footprint types
Provided Associated Constants§
Sourceconst SHADER_SIZE: NonZeroU64 = _
const SHADER_SIZE: NonZeroU64 = _
Represents WGSL Size (equivalent to ShaderType::min_size
)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
impl ShaderSize for Option<NonZeroI32>
impl ShaderSize for Option<NonZeroU32>
impl ShaderSize for f32
impl ShaderSize for i32
impl ShaderSize for u32
impl ShaderSize for Mat3where
f32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for Mat2where
f32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for Mat4where
f32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for Vec4where
f32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for Vec2where
f32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for Vec3where
f32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for IVec2where
i32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for IVec3where
i32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for IVec4where
i32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for UVec2where
u32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for UVec3where
u32: ShaderSize,
Available on crate feature
glam
only.impl ShaderSize for UVec4where
u32: ShaderSize,
Available on crate feature
glam
only.