vmt_parser/material/
vertexlitgeneric.rs1use super::deserialize_path;
2use crate::{
3 default_detail_scale, default_scale, default_scale3, BlendMode, TextureTransform, Vec2, Vec3,
4};
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct VertexLitGenericMaterial {
9 #[serde(
11 rename = "$basetexture",
12 default,
13 deserialize_with = "deserialize_path"
14 )]
15 pub base_texture: Option<String>,
16 #[serde(rename = "$detail", default, deserialize_with = "deserialize_path")]
18 pub detail: Option<String>,
19 #[serde(
21 rename = "$decaltexture",
22 default,
23 deserialize_with = "deserialize_path"
24 )]
25 pub decal_texture: Option<String>,
26
27 #[serde(rename = "$color2", default = "default_scale3")]
29 pub color2: Vec3,
30 #[serde(rename = "$basetexturetransform", default)]
32 pub base_texture_transform: TextureTransform,
33 #[serde(rename = "$color", default = "default_scale3")]
35 pub color: Vec3,
36 #[serde(rename = "$decalscale", default = "default_detail_scale")]
37 pub detail_scale: Vec2,
39 #[serde(rename = "$detailblendfactor", default = "default_scale")]
41 pub detail_blend_factor: f32,
42 #[serde(rename = "$detailblendmode", default)]
44 pub detail_blend_mode: BlendMode,
45 #[serde(
47 rename = "$modelmaterial",
48 default,
49 deserialize_with = "deserialize_path"
50 )]
51 pub model_material: Option<String>,
52 #[serde(rename = "$pointsamplemagfilter", default)]
54 pub point_sample_mag_filter: bool,
55 #[serde(rename = "$seamless_scale", default = "default_scale")]
57 pub seamless_scale: f32,
58
59 #[serde(rename = "$alpha", default = "default_scale")]
61 pub alpha: f32,
62 #[serde(rename = "$alphatest", default)]
64 pub alpha_test: bool,
65 #[serde(rename = "$alphatestreference", default = "default_scale")]
67 pub alpha_test_reference: f32,
68 #[serde(rename = "$distancealpha", default)]
70 pub distance_alpha: bool,
71 #[serde(rename = "$nocull", default)]
73 pub no_cull: bool,
74 #[serde(rename = "$translucent", default)]
76 pub translucent: bool,
77
78 #[serde(rename = "$bumpmap", default, deserialize_with = "deserialize_path")]
80 pub bump_map: Option<String>,
81 #[serde(
83 rename = "$lightwarptexture",
84 default,
85 deserialize_with = "deserialize_path"
86 )]
87 pub light_wrap_texture: Option<String>,
88 #[serde(rename = "$selfillum", default)]
90 pub self_illum: bool,
91 #[serde(rename = "$ssbump", default)]
93 pub ss_bump: bool,
94
95 #[serde(rename = "$envmap", default, deserialize_with = "deserialize_path")]
97 pub env_map: Option<String>,
98 #[serde(rename = "$phong", default)]
100 pub phong: f32,
101
102 #[serde(rename = "$nofog", default)]
104 pub no_fog: bool,
105
106 #[serde(rename = "$ignorez", default)]
108 pub ignore_z: bool,
109}