{"id":22243348,"url":"https://github.com/galaco/vmt","last_synced_at":"2025-07-28T01:32:37.860Z","repository":{"id":52714387,"uuid":"209169516","full_name":"Galaco/vmt","owner":"Galaco","description":"Golang package for parsing .vmt Valve Material files","archived":false,"fork":false,"pushed_at":"2022-10-28T01:06:47.000Z","size":20,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T11:13:33.671Z","etag":null,"topics":["counter-strike","material","parser","source-engine","team-fortress-2","valve","vmt","vtf"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Galaco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-17T22:41:02.000Z","updated_at":"2024-07-16T19:54:34.000Z","dependencies_parsed_at":"2022-08-22T09:21:25.996Z","dependency_job_id":null,"html_url":"https://github.com/Galaco/vmt","commit_stats":null,"previous_names":["golang-source-engine/vmt"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Galaco/vmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fvmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fvmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fvmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fvmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Galaco","download_url":"https://codeload.github.com/Galaco/vmt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fvmt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451027,"owners_count":24089291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["counter-strike","material","parser","source-engine","team-fortress-2","valve","vmt","vtf"],"created_at":"2024-12-03T04:26:03.160Z","updated_at":"2025-07-28T01:32:37.601Z","avatar_url":"https://github.com/Galaco.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/galaco/vmt?status.svg)](https://godoc.org/github.com/galaco/vmt)\n[![Go report card](https://goreportcard.com/badge/github.com/galaco/vmt)](https://goreportcard.com/badge/github.com/galaco/vmt)\n[![GolangCI](https://golangci.com/badges/github.com/galaco/vmt.svg)](https://golangci.com)\n[![CircleCI](https://circleci.com/gh/galaco/vmt/tree/master.svg?style=svg)](https://circleci.com/gh/galaco/vmt/tree/master)\n[![codecov](https://codecov.io/gh/galaco/vmt/branch/master/graph/badge.svg)](https://codecov.io/gh/galaco/vmt)\n\n# vmt\n\n\u003e Vmt is a parser for Valve Material Format (`.vmt`) files.\n\nVmt's in Source can be a little painful; large number of possible parameters, many being\nspecific to a particular shader. This package exists to reduce the pain of parsing materials.\n\nYou can use either the `Properties` struct provided, or a custom definition to only get the properties desired. Properties must\nbe correctly typed in whatever definition is used. \n\nIf there are parameters missing from the standard `Properties` definition, please submit a PR to add them.\n\n\n**For now, nested properties are unsupported (e.g. `Proxies`).**\n\n### Usage:\nThere are 3 ways to read material definitions using this package:\n\n##### From a github.com/golang-source-engine/filesystem\nThis is the recommended solution, as it is the only method of resolving a material that\nuses the `include` property.\n```go\nvar fs *filesystem.Filesystem // create this elsewhere\nresult := vmt.NewProperties()\nmat,err := vmt.FromFilesystem(\"metal/metal_01.vmt\", fs, result)\n```\n\n##### From a stream\n```go\nstream,_ := os.Open(\"metal/metal_01.vmt\")\nresult := vmt.NewProperties()\nmat,err := vmt.FromStream(stream, result)\n```\n\n##### From existing github.com/galaco/keyvalues\n```go\nvar kv *keyvalues.KeyValue // create this elsewhere\nresult := vmt.NewProperties()\nmat,err := vmt.FromKeyValues(kv, result)\n```\n\n\n##### Material Definitions\nIf you've ever used the build-in json package, this should be familiar. See the `Properties` struct in this package for the default material. However, you can define your own definition below:\n```go\npackage foo\n\ntype CustomShader struct {\n    MyProperty string `vmt:$myproperty`\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalaco%2Fvmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgalaco%2Fvmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalaco%2Fvmt/lists"}