Template:MatParamDef/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{Doc/subpage}} | ||
<!-- Please place categories where indicated at the bottom of this page. --> | <!-- Please place categories where indicated at the bottom of this page. --> | ||
This template is used to generate [[material]] [[shader]] parameter definitions on material shader pages. | This template is used to generate [[material]] [[shader]] parameter definitions on material shader pages. | ||
== Usage == | == Usage == | ||
<nowiki>{{MatParam|<name>|<variable type>|<description>}}</nowiki> | {{Code|<nowiki>{{MatParam|<name>|<variable type>|<description>}}</nowiki>}} | ||
{{ | {{ModernNote|Don't forget to use [[Template:=]] to escape any "{{=}}" characters in the text.}} | ||
== Examples and Parameters == | == Examples and Parameters == | ||
{| class=standard-table | {| class="standard-table" | ||
! Parameter | ! Parameter | ||
! Description | |||
! Example | |||
! Preview | |||
|- | |- | ||
| | | align="center" | {{Param|deprecated}} | ||
| This material parameter is deprecated and should no longer be used. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| I'm deprecated | bool | deprecated = 1 | |||
| Really, don't use me anymore! | |||
}}</nowiki>}} | |||
| {{MatParam|I'm deprecated|bool|deprecated=1|Really, don't use me anymore!}} | |||
|- | |- | ||
| | | align="center" | {{Param|since}} | ||
| This material parameter is available since this game. Uses the template {{tl|Since}}. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $likealienswarm | bool | since = {{as}} | |||
| I'm available in Portal 2, too! | |||
}}</nowiki>}} | |||
| {{MatParam|$likealienswarm|bool|since={{as}}|I'm available in Portal 2, too!}} | |||
|- | |- | ||
| | | align="center" | {{Param|also}} | ||
| This material parameter is also available in this game. Uses the template {{tl|Also}}. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $likealienswarm | bool | since = {{as}} | also = {{GMOD}} | |||
| I'm also available in Garry's Mod! | |||
}}</nowiki>}} | |||
| {{MatParam|$likealienswarm|bool|since={{as}}|also={{GMOD}}|I'm also available in Garry's Mod!}} | |||
|- | |- | ||
| | | align="center" | {{Param|only}} | ||
| This material parameter is available only in this/these game(s). Uses the template {{tl|Only}}. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $lovealienswarm | integer | only = {{as}} | |||
| I'm only available in Alien Swarm! | |||
}}</nowiki>}} | |||
| {{MatParam|$lovealienswarm|integer|only={{as}}|I'm only available in Alien Swarm!}} | |||
|- | |- | ||
| | | align="center" | {{Param|removed}} | ||
| This material parameter was removed in this game. Uses the template {{tl|Removed}}. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $dxparameter | int | removed = {{l4d}} | |||
| I was removed in Left 4 Dead! | |||
}}</nowiki>}} | |||
| {{MatParam|$dxparameter|integer|I was removed in Left 4 Dead!|removed={{l4d}}}} | |||
|- | |- | ||
| | | align="center" | {{Param|dx9}} | ||
| This material parameter requires DX9 or higher to function. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $dx9parameter | bool | dx9 = 1 | |||
| I require DX9 to work! | |||
}}</nowiki>}} | |||
| {{MatParam|$dx9parameter|bool|I require DX9 to work!|dx9=1}} | |||
|- | |- | ||
| | | align="center" | {{Param|dx8}} | ||
| This material parameter is for DX8, and should not be used for DX9. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $dx8parameter | bool | dx8 = 1 | |||
| I'm a material parameter for DX8! | |||
}}</nowiki>}} | |||
| {{MatParam|$dx8parameter|bool|I'm a material parameter for DX8!|dx8=1}} | |||
|- | |- | ||
| | | align="center" | {{Param|to}} | ||
| Use this to define a set of material parameters with very similar names. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $basetexture1 | to = $basetexture4 | texture | |||
| There are many of us... | |||
}}</nowiki>}} | |||
| {{MatParam|$basetexture1|to=$basetexture4|texture|There are many of us...}} | |||
|- | |- | ||
| | | align="center" | {{Param|and}} | ||
| Use this to define two material parameters with very similar names. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $bumpmap | and = $bumpmap2 | texture | |||
| This shader supports two bump maps. | |||
}}</nowiki>}} | |||
| {{MatParam|$bumpmap|and=$bumpmap2|texture|This shader supports two bump maps.}} | |||
|- | |- | ||
| | | align="center" | {{Param|shaders}} | ||
| Lists the shaders for a specific material parameter. Uses the template {{tl|Shaders}}. | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $shaderspecificparameter | float | |||
| shaders = VertexLitGeneric, UnlitGeneric | |||
| I only work with specific shaders! | |||
}}</nowiki>}} | |||
| {{MatParam|$shaderspecificparameter|float|I only work with specific shaders!|shaders=VertexLitGeneric, UnlitGeneric}} | |||
|- | |- | ||
| | | align="center" | {{Param|value}} | ||
| Default Value | |||
| {{CodeBlock|margin=5px|<nowiki>{{MatParam | |||
| $defaultvalue | integer | value = 1 | |||
| Bla bla bla | |||
}}</nowiki>}} | |||
| {{MatParam|$defaultvalue|integer|Bla bla bla|value=1}} | |||
|} | |} | ||
Line 39: | Line 109: | ||
* [[Template:IO]] | * [[Template:IO]] | ||
{{Doc/Sandbox other| [[Category:Formatting templates]] }} | |||
[[Category:Formatting templates]] | |||
}} |
Revision as of 04:32, 6 April 2023

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.
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 |
---|---|---|---|
{{{deprecated}}} | This material parameter is deprecated and should no longer be used. | I'm deprecated
| |
{{{since}}} | This material parameter is available since this game. Uses the template {{Since}} .
|
$likealienswarm
| |
{{{also}}} | This material parameter is also available in this game. Uses the template {{Also}} .
|
$likealienswarm
| |
{{{only}}} | This material parameter is available only in this/these game(s). Uses the template {{Only}} .
|
$lovealienswarm
| |
{{{removed}}} | This material parameter was removed in this game. Uses the template {{Removed}} .
|
$dxparameter
| |
{{{dx9}}} | This material parameter requires DX9 or higher to function. | $dx9parameter
| |
{{{dx8}}} | This material parameter is for DX8, and should not be used for DX9. | $dx8parameter
| |
{{{to}}} | Use this to define a set of material parameters with very similar names. | $basetexture1
| |
{{{and}}} | Use this to define two material parameters with very similar names. | $bumpmap
| |
{{{shaders}}} | Lists the shaders for a specific material parameter. Uses the template {{Shaders}} .
|
$shaderspecificparameter
| |
{{{value}}} | Default Value | $defaultvalue
|
See Also