Patch: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Replaced content with " {{MultiPage}}")
Tag: Replaced
Line 1: Line 1:
{{Source topicon}} {{Lang}}
{{this is a|pixel shader|name=Patch}} It is a special shader that allows materials to [[Wikipedia:Inheritance (computer science)|inherit]] from each other. This is achieved with two commands:
;<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>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.
{{MultiPage}}
:{{note|<tt>Patch</tt> material including other <tt>Patch</tt> materials seems to work fine in {{sfm}}.}}
 
==Example==
'''patch'''
{
'''include''' materials\models\infected\common\common_infected_shared.vmt
'''insert'''
{
$basetexture models\infected\common\military_national_guard\common_military_upper_01
}
}

Revision as of 05:57, 26 February 2024

Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.