Skip to main content

vmt_parser/material/
modulate.rs

1use super::deserialize_path;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct ModulateMaterial {
6    /// Multiplies the color behind it with this surface's texture.
7    #[serde(rename = "$basetexture", deserialize_with = "deserialize_path")]
8    pub base_texture: String,
9    /// Doubles the modulation, making it appear brighter. 1 enables this, 0 disables. Disabled by default.
10    #[serde(rename = "$mod2x", default)]
11    pub mod_2x: bool,
12    /// Disables backface culling.
13    #[serde(rename = "$nocull", default)]
14    pub no_cull: bool,
15}
16
17#[derive(Debug, Clone, Serialize, Deserialize, Default)]
18#[serde(rename_all = "snake_case")]
19#[allow(unused)]
20pub enum SpriteOrientation {
21    ParallelUpright,
22    #[default]
23    VpParallel,
24    Oriented,
25    VpParallelOriented,
26}