Parser for source engine material files
  • Rust 99.3%
  • Nix 0.7%
Find a file
2025-06-02 20:29:37 +02:00
.forgejo/workflows workflow updates 2025-06-02 20:11:22 +02:00
examples released vdf-reader 2023-12-21 20:42:40 +01:00
src fix prop names 2025-02-15 17:23:03 +01:00
tests fix prop names 2025-02-15 17:23:03 +01:00
.envrc vdf work 2023-12-15 00:19:33 +01:00
.gitignore LightMappedGeneric 2023-12-18 19:17:34 +01:00
Cargo.lock update vdf-reader 2025-03-01 21:39:49 +01:00
Cargo.toml update repo url 2025-06-02 20:11:57 +02:00
flake.lock flake update 2025-06-02 20:11:08 +02:00
flake.nix flake update 2025-06-02 20:11:08 +02:00
README.md add basic readme 2025-06-02 20:29:37 +02:00

vmt-parser

Parser for source engine material files.

Usage

use vmt_parser::from_str;
use std::fs::read_to_string;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let raw = read_to_string("material.vmt")?;
    let material = from_str(&raw)?;
    println!("texture: {}", material.base_texture());
    Ok(())
}

Material support

Because this crate focuses on extracting common rendering parameters from the materials, it only supports a fixed set of materials. If you need to parse a material that isn't supported by this crate, you can do a more manual parsing by using vdf-reader directly.