Patch

From Valve Developer Community
Revision as of 04:25, 31 December 2008 by TomEdwards (talk | contribs)
Jump to navigation Jump to search

Patch is a special shader that allows materials to inherit from each other. This is achieved with two commands:

include
The base material from which to inherit. Can be anything.
insert
The parameters to add, inside { and }. If you pass one that already exists it will override the original.
Tip.pngTip:<parameter> "" can be used to remove an established value.

Patch's only limitation is that it cannot change a material's shader.

Example

patch
{
	include materials\models\infected\common\common_infected_shared.vmt
	insert
	{
		$basetexture models\infected\common\military_national_guard\common_military_upper_01
	}
}
Note.pngNote:include requires the complete path to the base material, including the materials\ folder and .vmt extension.