Template:MatParamDef: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(finishing color removal to see redlinks)
(Lx links)
Line 12: Line 12:
<div><!--
<div><!--
--><kbd><!--
--><kbd><!--
-->{{Trim|[[{{{1|}}}|{{{1|}}}]]}}<!--
-->{{Lx|{{{1}}}}}<!--
-->{{#if:{{{to|}}}|&nbsp;to [[{{{to}}}|{{{to}}}]]}}<!--
-->{{#if:{{{to|}}}|&nbsp;to {{Lx|{{{to}}}}}<!--
-->{{#if:{{{and|}}}|&nbsp;and [[{{{and}}}|{{{and}}}]]}}<!--
-->{{#if:{{{and|}}}|&nbsp;and {{Lx|{{{and}}}}}<!--
--></kbd><!--
--></kbd><!--
-->&nbsp;{{VT|{{{2|}}}}}<!--
-->&nbsp;{{VT|{{{2|}}}}}<!--

Revision as of 02:41, 1 August 2024

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

This template is used to generate material shader parameter definitions on material shader pages.

Usage

{{MatParamDef|<name>|<variable type>|<description>}}

Examples and Parameters

Warning.pngWarning:The code in the example will not work correctly due to the use of <kbd> in the template. Please refer to the $bumpmap page code to see the current code.
Parameter Description Example Preview
{{{text}}}
or
{{{3}}}
Description of the parameter.

If specified, then you will not encounter the problem of a broken description if there are equal signs in it.

You can also use {{=}}, but this may overload the page.

If not specified, it is replaced with TODO.

{{MatParamDef
| $stupidequalsign | bool | text = Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5
}}
$stupidequalsign{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <boolean>
Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5
{{{described}}} Replaces the text with a link to the specified material parameter.
{{MatParamDef
| $describedcutie | texture | described = true
}}
$describedcutie{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <texture>
{{{deprecated}}} This material parameter is deprecated and should no longer be used.
{{MatParamDef
| I'm deprecated | bool | deprecated = 1
| Really, don't use me anymore!
}}
I'm deprecated{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <boolean> Obsolete
Really, don't use me anymore!
{{{since}}} This material parameter is available since this game. Uses the template {{Since}}.
{{MatParamDef
| $likealienswarm | bool | since = {{as}}
| I'm available in Portal 2, too!
}}
$likealienswarm{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <boolean> (in all games since Alien Swarm)
I'm available in Portal 2, too!
{{{also}}} This material parameter is also available in this game. Uses the template {{Also}}.
{{MatParamDef
| $likealienswarm | bool | since = {{as}} | also = {{GMOD}}
| I'm also available in Garry's Mod!
}}
$likealienswarm{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <boolean> (in all games since Alien Swarm) (also in Garry's Mod)
I'm also available in Garry's Mod!
{{{only}}} This material parameter is available only in this/these game(s). Uses the template {{Only}}.
{{MatParamDef
| $lovealienswarm | integer | only = {{as}}
| I'm only available in Alien Swarm!
}}
$lovealienswarm{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <integer> (only in Alien Swarm)
I'm only available in Alien Swarm!
{{{removed}}} This material parameter was removed in this game. Uses the template {{Removed}}.
{{MatParamDef
| $dxparameter | int | removed = {{l4d}}
| I was removed in Left 4 Dead!
}}
$dxparameter{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <integer> (removed since Left 4 Dead)
I was removed in Left 4 Dead!
{{{dx9}}} This material parameter requires DX9 or higher to function.
{{MatParamDef
| $dx9parameter | bool | dx9 = 1
| I require DX9 to work!
}}
$dx9parameter{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <boolean> (DX9 SM2)
I require DX9 to work!
{{{dx8}}} This material parameter is for DX8, and should not be used for DX9.
{{MatParamDef
| $dx8parameter | bool | dx8 = 1
| I'm a material parameter for DX8!
}}
$dx8parameter{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <boolean> (DX8)
I'm a material parameter for DX8!
{{{to}}} Use this to define a set of material parameters with very similar names.
{{MatParamDef
| $basetexture1 | to = $basetexture4 | texture
| There are many of us...
}}
$basetexture1{{#if:$basetexture4| to $basetexture4{{#if:| and [[{{{and}}}|{{{and}}}]] <texture>
There are many of us...
{{{and}}} Use this to define two material parameters with very similar names.
{{MatParamDef
| $bumpmap | and = $bumpmap2 | texture
| This shader supports two bump maps.
}}
$bumpmap{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:$bumpmap2| and $bumpmap2 <texture>
This shader supports two bump maps.
{{{shaders}}} Lists the shaders for a specific material parameter. Uses the template {{Shaders}}.
{{MatParamDef
| $shaderspecificparameter | float | shaders = VertexLitGeneric, UnlitGeneric
| I only work with specific shaders!
}}
$shaderspecificparameter{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <float>
Shader(s): VertexLitGeneric, UnlitGeneric
I only work with specific shaders!
{{{value}}} Default value of the parameter.
{{MatParamDef
| $defaultvalue | integer | value = 1
| Why do I have such a small value? :(
}}
$defaultvalue{{#if:| to [[{{{to}}}|{{{to}}}]]{{#if:| and [[{{{and}}}|{{{and}}}]] <integer>
Default Value: 1
Why do I have such a small value? :(

See also