Template:MatParamDef/doc/zh

From Valve Developer Community
Jump to navigation Jump to search
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.

本模板是用于材质着色器页面生成材质着色器参数定义的。

基本用法

{[MatParamDef|名称|变量类型|描述}}

Note.png注意:记得使用Template:=来转义所有的「=」字符。

预设的参数

参数 描述 例子 预览
deprecated 该材质参数已作废,不宜继续使用。 {[MatParamDef|I'm deprecated|text=布尔值|真的,不要再用我啦!|deprecated=1}}
since 该材质参数自该游戏起可以使用。它使用了模板{{<game> add}}。 {{MatParamDef|$likealienswarm|text=布尔值|我也可以在Portal 2中使用!|since=AS}}
布尔值
also 该材质参数在该游戏中也可以使用。它使用了模板{{<game> also}}。 {{MatParamDef|$likealienswarm|text=布尔值|我也可以在Garry's Mod中使用!|since=AS|also=GMOD}}
$likealienswarm(en) <我也可以在Garry's Mod中使用!(en)> (存在于自 AS) (也存在于 GMOD)
布尔值
only 该材质参数只能在该游戏中使用。它使用了模板{{<game> only}}。 {{MatParamDef|$lovealienswarm|text=布尔值|我只能在Alien Swarm中使用!|only=AS}}
布尔值
dx9 该材质参数要求DX9以上才能运行。 {[MatParamDef|$dx9parameter||text=布尔值|我要求DX9才能运行!|dx9=1}}
$dx9parameter(en) <布尔值(en)> (DX9 SM2)
我要求DX9才能运行!
dx8 该材质参数是给DX8用的,不宜被用于DX9。 {[MatParamDef|$dx8parameter|text=布尔值|我是一个给DX8用的材质参数!|dx8=1}}
我是一个给DX8用的材质参数!
to 使用这个来定义一系列名字很相似的材质参数。 {[MatParamDef|$basetexture1|to=$basetexture4|text=纹理|我们有许多……}}
我们有许多……
and 使用这个来定义两个名字很相似的材质参数。 {[MatParamDef|$bumpmap|and=$bumpmap2|text=纹理|两张法线贴图。}}

参见