#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum TextureColorSpace {
Linear,
Srgb,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct TextureTransform {
offset: [f32; 2],
rotation_radians: f32,
scale: [f32; 2],
tex_coord: Option<u32>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MaterialKind {
Unlit,
PbrMetallicRoughness,
Line,
Wireframe,
Edge,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum AlphaMode {
Opaque,
Mask { cutoff: f32 },
Blend,
}
impl TextureTransform {
pub const fn new(
offset: [f32; 2],
rotation_radians: f32,
scale: [f32; 2],
tex_coord: Option<u32>,
) -> Self {
Self {
offset,
rotation_radians,
scale,
tex_coord,
}
}
pub const fn offset(self) -> [f32; 2] {
self.offset
}
pub const fn rotation_radians(self) -> f32 {
self.rotation_radians
}
pub const fn scale(self) -> [f32; 2] {
self.scale
}
pub const fn tex_coord(self) -> Option<u32> {
self.tex_coord
}
}