Template:MatParamDef/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎See also: clean up, replaced: See Also → See also)
Line 13: Line 13:
! Preview
! Preview
|-
|-
| align="center" | {{Param|text}}
| align="center" | {{Param|text}}<br>{{param|3}}
| Description of the parameter.
| Description of the parameter.


Line 22: Line 22:
| $stupidequalsign | bool
| $stupidequalsign | bool
| text = Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5
| text = Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5
}}</nowiki>}}
{{CodeBlock|margin=5px|<nowiki>{{MatParam
| $stupidequalsign | bool
| 3 = Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5
}}</nowiki>}}
}}</nowiki>}}
| {{MatParam|$stupidequalsign|bool|text=Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5}}
| {{MatParam|$stupidequalsign|bool|text=Wow, I've been fixed! Look at this {{Emoji|point_right}} 2 + 2 = 5}}

Revision as of 17:12, 13 August 2024

Edit-copy.png
This is a documentation subpage for Template:MatParamDef.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

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

Usage

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

Examples and Parameters

Parameter Description Example Preview
{{{text}}}
{{{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.

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

See also