euv_core/game/engine3d/texture/enum.rs
1/// Color-space interpretation of a 3D texture during mipmap filtering and shader sampling.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
3pub enum TextureColorSpace {
4 /// Gamma-encoded sRGB color data (albedo, emissive, sheen color).
5 #[default]
6 Srgb,
7 /// Linear scalar/color data (metallic-roughness, occlusion, clearcoat, transmission).
8 Linear,
9 /// Tangent-space normal map (`[0..255] -> [-1..1]`, re-normalized across mip levels).
10 NormalTangent,
11}
12
13/// Texture sampling filter mode aligned with glTF 2.0 / WebGL constants.
14#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
15pub enum TextureFilterMode {
16 /// Nearest-texel sampling (`9728`).
17 Nearest,
18 /// Bilinear texel interpolation (`9729`).
19 #[default]
20 Linear,
21 /// Nearest texel within nearest mip level (`9984`).
22 NearestMipmapNearest,
23 /// Bilinear texels within nearest mip level (`9985`).
24 LinearMipmapNearest,
25 /// Nearest texel blended between adjacent mip levels (`9986`).
26 NearestMipmapLinear,
27 /// Trilinear filtering across adjacent mip levels (`9987`).
28 LinearMipmapLinear,
29}
30
31/// Texture coordinate wrap behavior aligned with glTF 2.0 / WebGL constants.
32#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
33pub enum TextureWrapMode {
34 /// Tile seamlessly modulo 1.0 (`10497`).
35 #[default]
36 Repeat,
37 /// Clamp coordinates to `[0.0, 1.0]` (`33071`).
38 ClampToEdge,
39 /// Reflect coordinates symmetrically on odd tiles (`33648`).
40 MirroredRepeat,
41}