Template:MatParamDef/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Documentation subpage for Template:MatParam)
 
(Updated documentation to reflect changes)
Line 14: Line 14:
| <code>deprecated</code> || This material parameter is deprecated and should no longer be used. || <code><nowiki>{{MatParam|I'm deprecated|bool|Really, don't use me anymore!|deprecated=1}}</nowiki></code> || {{MatParam|I'm deprecated|bool|Really, don't use me anymore!|deprecated=1}}
| <code>deprecated</code> || This material parameter is deprecated and should no longer be used. || <code><nowiki>{{MatParam|I'm deprecated|bool|Really, don't use me anymore!|deprecated=1}}</nowiki></code> || {{MatParam|I'm deprecated|bool|Really, don't use me anymore!|deprecated=1}}
|-
|-
| <code>since</code> || This material parameter is available since this game. Uses the template <nowiki>{{<game> add}}</nowiki>. || <code><nowiki>{{MatParam|$likealienswarm|bool|I'm available in Portal 2, too!|since=AS}}</nowiki></code> || {{MatParam|$likealienswarm|bool|I'm available in Portal 2, too!|since=AS}}
| <code>since</code> || This material parameter is available since this game. Uses the template {{tl|Since}}. || <code><nowiki>{{MatParam|$likealienswarm|bool|I'm available in Portal 2, too!|since={{as}}}}</nowiki></code> || {{MatParam|$likealienswarm|bool|I'm available in Portal 2, too!|since={{as}}}}
|-
|-
| <code>also</code> || This material parameter is also available in this game. Uses the template <nowiki>{{<game> also}}</nowiki>. || <code><nowiki>{{MatParam|$likealienswarm|bool|I'm also available in Garry's Mod!|since=AS|also=GMOD}}</nowiki></code> || {{MatParam|$likealienswarm|bool|I'm also available in Garry's Mod!|since=AS|also=GMOD}}
| <code>also</code> || This material parameter is also available in this game. Uses the template {{tl|Also}}. || <code><nowiki>{{MatParam|$likealienswarm|bool|I'm also available in Garry's Mod!|since={{as}}|also={{GMOD}}}}</nowiki></code> || {{MatParam|$likealienswarm|bool|I'm also available in Garry's Mod!|since={{as}}|also={{GMOD}}}}
|-
|-
| <code>only</code> || This material parameter is available only in this game. Uses the template <nowiki>{{<game> only}}</nowiki>. || <code><nowiki>{{MatParam|$lovealienswarm|bool|I'm only available in Alien Swarm!|only=AS}}</nowiki></code> || {{MatParam|$lovealienswarm|integer|I'm only available in Alien Swarm!|only=AS}}
| <code>only</code> || This material parameter is available only in this/these game(s). Uses the template {{tl|Only}}. || <code><nowiki>{{MatParam|$lovealienswarm|integer|I'm only available in Alien Swarm!|only={{as}}}}</nowiki></code> || {{MatParam|$lovealienswarm|integer|I'm only available in Alien Swarm!|only={{as}}}}
|-
|-
| <code>dx9</code> || This material parameter requires DX9 or higher to function. || <code><nowiki>{{MatParam|$dx9parameter|boolean|I require DX9 to work!|dx9=1}}</nowiki></code> || {{MatParam|$dx9parameter|bool|I require DX9 to work!|dx9=1}}
| <code>removed</code> || This material parameter was removed in this game. Uses the template {{tl|Removed}}. || <code><nowiki>{{MatParam|$dxparameter|int|I was removed in Left 4 Dead!|removed={{l4d}}}}</nowiki></code> || {{MatParam|$dxparameter|integer|I was removed in Left 4 Dead!|removed={{l4d}}}}
|-
|-
| <code>dx8</code> || This material parameter is for DX8, and should not be used for DX9. || <code><nowiki>{{MatParam|$dx8parameter|boolean|I'm a material parameter for DX8!|dx8=1}}</nowiki></code> || {{MatParam|$dx8parameter|bool|I'm a material parameter for DX8!|dx8=1}}
| <code>dx9</code> || This material parameter requires DX9 or higher to function. || <code><nowiki>{{MatParam|$dx9parameter|bool|I require DX9 to work!|dx9=1}}</nowiki></code> || {{MatParam|$dx9parameter|bool|I require DX9 to work!|dx9=1}}
|-
| <code>dx8</code> || This material parameter is for DX8, and should not be used for DX9. || <code><nowiki>{{MatParam|$dx8parameter|bool|I'm a material parameter for DX8!|dx8=1}}</nowiki></code> || {{MatParam|$dx8parameter|bool|I'm a material parameter for DX8!|dx8=1}}
|-
|-
| <code>to</code> || Use this to define a set of material parameters with very similar names. || <code><nowiki>{{MatParam|$basetexture1|to=$basetexture4|texture|There are many of us...}}</nowiki></code> || {{MatParam|$basetexture1|to=$basetexture4|texture|There are many of us...}}
| <code>to</code> || Use this to define a set of material parameters with very similar names. || <code><nowiki>{{MatParam|$basetexture1|to=$basetexture4|texture|There are many of us...}}</nowiki></code> || {{MatParam|$basetexture1|to=$basetexture4|texture|There are many of us...}}
|-
|-
| <code>and</code> || Use this to define two material parameters with very similar names. || <code><nowiki>{{MatParam|$bumpmap|and=$bumpmap2|texture|This shader supports two bump maps.}}</nowiki></code> || {{MatParam|$bumpmap|and=$bumpmap2|texture|This shader supports two bump maps.}}
| <code>and</code> || Use this to define two material parameters with very similar names. || <code><nowiki>{{MatParam|$bumpmap|and=$bumpmap2|texture|This shader supports two bump maps.}}</nowiki></code> || {{MatParam|$bumpmap|and=$bumpmap2|texture|This shader supports two bump maps.}}
|-
| <code>shaders</code> || Lists the shaders for a specific material parameter. Uses the template {{tl|Shaders}}. || <code><nowiki>{{MatParam|$shaderspecificparameter|float|I only work with specific shaders!|shaders=LightmappedGeneric, WorldVertexTransition}}</nowiki></code> || {{MatParam|$shaderspecificparameter|float|I only work with specific shaders!|shaders=LightmappedGeneric, WorldVertexTransition}}
|}
|}



Revision as of 19:03, 22 April 2020

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>}}

Note.pngNote:Don't forget to use Template:= to escape any "=" characters in the text.

Examples and Parameters

Parameter Description Example Preview
deprecated This material parameter is deprecated and should no longer be used. {{MatParam|I'm deprecated|bool|Really, don't use me anymore!|deprecated=1}} I'm deprecated
since This material parameter is available since this game. Uses the template {{Since}}. {{MatParam|$likealienswarm|bool|I'm available in Portal 2, too!|since={{as}}}} $likealienswarm
also This material parameter is also available in this game. Uses the template {{Also}}. {{MatParam|$likealienswarm|bool|I'm also available in Garry's Mod!|since={{as}}|also={{GMOD}}}} $likealienswarm
only This material parameter is available only in this/these game(s). Uses the template {{Only}}. {{MatParam|$lovealienswarm|integer|I'm only available in Alien Swarm!|only={{as}}}} $lovealienswarm
removed This material parameter was removed in this game. Uses the template {{Removed}}. {{MatParam|$dxparameter|int|I was removed in Left 4 Dead!|removed={{l4d}}}} $dxparameter
dx9 This material parameter requires DX9 or higher to function. {{MatParam|$dx9parameter|bool|I require DX9 to work!|dx9=1}} $dx9parameter
dx8 This material parameter is for DX8, and should not be used for DX9. {{MatParam|$dx8parameter|bool|I'm a material parameter for DX8!|dx8=1}} $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|I only work with specific shaders!|shaders=LightmappedGeneric, WorldVertexTransition}} $shaderspecificparameter

See also