mirror of
https://codeberg.org/icewind/vmt-parser.git
synced 2026-06-03 12:04:06 +02:00
water wip
This commit is contained in:
parent
12793d367c
commit
aac06e896b
5 changed files with 143 additions and 0 deletions
65
tests/data/water_murky.vmt
Normal file
65
tests/data/water_murky.vmt
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
"Water"
|
||||
{
|
||||
|
||||
|
||||
"%keywords" "tf"
|
||||
// $forcecheap 1
|
||||
|
||||
"%tooltexture" "dev/tfwater_normal"
|
||||
"%compilewater" 1
|
||||
"$abovewater" 1
|
||||
// "$nofresnel" "1"
|
||||
|
||||
$underwateroverlay "effects/water_warp"
|
||||
"$envmap" "env_cubemap"
|
||||
"$refracttexture" "_rt_WaterRefraction"
|
||||
"$refractamount" ".12"
|
||||
// "$refracttint" "{88 192 44}"
|
||||
"$refractblur" "1"
|
||||
|
||||
|
||||
|
||||
"$scale" "[1 1]"
|
||||
|
||||
"$basetexture" "swamp/water/water_murky"
|
||||
// "$bumpmap" "water/water_dudv"
|
||||
"$normalmap" "water/tfwater001_normal"
|
||||
|
||||
"$surfaceprop" "water"
|
||||
"$bottommaterial" "swamp/water/water_murky_beneath.vmt"
|
||||
"$bumpframe" "0"
|
||||
|
||||
"$fogenable" 1
|
||||
"$fogcolor" "{35 32 20}"
|
||||
"$fogstart" "0"
|
||||
"$fogend" "170"
|
||||
|
||||
"$temp" "[0 0]"
|
||||
"$curr" 0.0
|
||||
"$curr2" 0.0
|
||||
|
||||
|
||||
"Proxies"
|
||||
{
|
||||
"AnimatedTexture"
|
||||
{
|
||||
"animatedtexturevar" "$normalmap"
|
||||
"animatedtextureframenumvar" "$bumpframe"
|
||||
"animatedtextureframerate" 30.00
|
||||
}
|
||||
|
||||
|
||||
"TextureScroll"
|
||||
{
|
||||
"texturescrollvar" "$bumptransform"
|
||||
"texturescrollrate" .01
|
||||
"texturescrollangle" 10.00
|
||||
}
|
||||
"WaterLOD"
|
||||
{
|
||||
// fixme! This has to be here, or material loading barfs.
|
||||
"dummy" 0
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ use vmt_parser::from_str;
|
|||
|
||||
#[test_case("tests/data/concretefloor003.vmt")]
|
||||
#[test_case("tests/data/mvm_backpack.vmt")]
|
||||
#[test_case("tests/data/water_murky.vmt")]
|
||||
fn test_serde(path: &str) {
|
||||
let raw = read_to_string(path).unwrap();
|
||||
match from_str(&raw) {
|
||||
|
|
|
|||
21
tests/snapshots/parse__tests__data__water_murky.vmt.snap
Normal file
21
tests/snapshots/parse__tests__data__water_murky.vmt.snap
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
source: tests/parse.rs
|
||||
expression: result
|
||||
---
|
||||
water(WaterMaterial(
|
||||
r#$basetexture: "swamp/water/water_murky",
|
||||
r#$abovewater: true,
|
||||
r#$bottommaterial: Some("swamp/water/water_murky_beneath.vmt"),
|
||||
r#$underwaterover: None,
|
||||
r#$bumpmap: None,
|
||||
r#$normalmap: Some("water/tfwater001_normal"),
|
||||
r#$dudvframe: 0,
|
||||
r#$bumpframe: 0,
|
||||
r#$bumptransform: "center 0.5 0.5 scale 1 1 rotate 0 translate 0 0",
|
||||
r#$flashlighttint: 1.0,
|
||||
r#$fogenable: true,
|
||||
r#$fogenable: Vec3((1.0, 1.0, 1.0)),
|
||||
r#$fogstart: 0.0,
|
||||
r#$fogend: 170.0,
|
||||
r#$lightmapwaterfog: false,
|
||||
))
|
||||
Loading…
Add table
Add a link
Reference in a new issue