Patch
Jump to navigation
Jump to search
Patch is a Pixel shader available in all
Source games. It is a special shader that inherits every single parameter of the vmt file defined in the include string. Allowing for the addition of new parameters or changes to existing ones by writing into the Insert section.
Some uses for patch is to have a "Master" material for all player models, weapons, or for all materials that belong to the same model that should have the same settings.
This way, you would not need to alter the same parameters in several vmt files should you need to make changes across them.
Patch's only limitations are that it cannot change a material's shader, and a Patch material cannot use include to inherit from another Patch material.
Bug:If the inherited material uses Cubemap VBSP will not able to replace it to patched version that link to the nearest cubemap (tested in: Source 2013)
Parameters:
include- The base material from which to inherit.
Note: The complete path is required, including materials\and.vmt. insert- The parameters to add, inside
{and}. Those that already exist are overridden.
Tip: <parameter> ""can be used to remove an established value. replace- The parameters to replace, inside
{and}.
Example
patch
{
include materials\models\infected\common\common_infected_shared.vmt
insert
{
$basetexture models\infected\common\military_national_guard\common_military_upper_01
}
}