Patch: Difference between revisions
Jump to navigation
Jump to search
Kestrelguy (talk | contribs) m (updated language bar. also some formatting.) |
SirYodaJedi (talk | contribs) m (CS:S uses replace as well) |
||
Line 3: | Line 3: | ||
;<code>include</code>:The base material from which to inherit.{{note|The ''complete'' path is required, including <code>materials\</code> and <tt>.vmt</tt>.}} | ;<code>include</code>:The base material from which to inherit.{{note|The ''complete'' path is required, including <code>materials\</code> and <tt>.vmt</tt>.}} | ||
;<code>insert</code>:The [[:Category:List of Shader Parameters|parameters]] to add, inside <code>{</code> and <tt>}</tt>. Those that already exist are overridden.{{tip|<code><parameter> ""</code> can be used to remove an established value.}} | ;<code>insert</code>:The [[:Category:List of Shader Parameters|parameters]] to add, inside <code>{</code> and <tt>}</tt>. Those that already exist are overridden.{{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 <tt>}</tt>.{{todo|Check if this is Orange-Box only. Seen in {{Tf2}}.}} | ;<code>replace</code>:The [[:Category:List of Shader Parameters|parameters]] to replace, inside <code>{</code> and <tt>}</tt>.{{todo|Check if this is Orange-Box only. Seen in {{Tf2}} and {{css}}.}} | ||
<tt>Patch</tt>'s only limitations are that it cannot change a material's [[shader]], and a <code>Patch</code> material cannot use <code>include</code> to inherit from another <code>Patch</code> material. | <tt>Patch</tt>'s only limitations are that it cannot change a material's [[shader]], and a <code>Patch</code> material cannot use <code>include</code> to inherit from another <code>Patch</code> material. |
Revision as of 13:30, 26 September 2022
Patch
It 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: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 }.
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.
Example
patch { include materials\models\infected\common\common_infected_shared.vmt insert { $basetexture models\infected\common\military_national_guard\common_military_upper_01 } }