Patch: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
:The [[:Category:List of Shader Parameters|parameters]] to add, inside <code>{</code> and <code>}</code>. Those that already exist are overridden.
:The [[:Category:List of Shader Parameters|parameters]] to add, inside <code>{</code> and <code>}</code>. Those that already exist are overridden.
:{{tip|<code><parameter> ""</code> can be used to remove an established value.}}
:{{tip|<code><parameter> ""</code> can be used to remove an established value.}}
;<code>replace</code>
:The [[:Category:List of Shader Parameters|parameters]] to replace, inside <code>{</code> and <code>}</code>.
:{{todo|Check if this is Orange-Box only. Seen in TF2.}}


<code>Patch</code>'s only limitation is that it cannot change a material's [[shader]].
<code>Patch</code>'s only limitation is that it cannot change a material's [[shader]].
Line 19: Line 22:
  $basetexture models\infected\common\military_national_guard\common_military_upper_01
  $basetexture models\infected\common\military_national_guard\common_military_upper_01
  }
  }
  }
  }


[[Category:List of Shaders]]
[[Category:List of Shaders]]

Revision as of 17:41, 22 September 2009

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.
Note.pngNote:The complete path is required, including materials\ and .vmt.
insert
The parameters to add, inside { and }. Those that already exist are overridden.
Tip.pngTip:<parameter> "" can be used to remove an established value.
replace
The parameters to replace, inside { and }.
Todo: Check if this is Orange-Box only. Seen in TF2.

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
	}
}