Template:MatParamDef/doc/zh: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎基本用法: clean up, replaced: {{note:zh-cn → {{note)
m (→‎参见: Split IO template links)
Line 30: Line 30:
== 参见 ==
== 参见 ==
* [[Template:KV:zh-cn|Template:KV]]
* [[Template:KV:zh-cn|Template:KV]]
* [[Template:IO]]
* [[Template:I]]
* [[Template:O]]


<hr>
<hr>
<onlyinclude>; {{#if: {{{deprecated|}}} | <del> }}<code>{{{1}}}</code> {{#if: {{{to|}}} | <span style="font-weight: normal;">到</span> <code>{{{to}}}</code> }} {{#if: {{{and|}}} | <span style="font-weight: normal;">和</span> <code>{{{and}}}</code> }} {{#if: {{{2|}}} | {{KV Type:zh-cn|{{{2}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{since|}}} | &nbsp;{{{{{since}}} add}} }}{{#if: {{{only|}}} | &nbsp;{{{{{only}}} only}} }} {{#if: {{{also|}}} | &nbsp;{{{{{also}}} also}} }} {{#if: {{{dx8|}}} | &nbsp;{{Dx8}} }} {{#if: {{{dx9|}}} | &nbsp;{{Dx9}} }} {{#if: {{{deprecated|}}} | &nbsp;{{obs}} }}
<onlyinclude>; {{#if: {{{deprecated|}}} | <del> }}<code>{{{1}}}</code> {{#if: {{{to|}}} | <span style="font-weight: normal;">到</span> <code>{{{to}}}</code> }} {{#if: {{{and|}}} | <span style="font-weight: normal;">和</span> <code>{{{and}}}</code> }} {{#if: {{{2|}}} | {{KV Type:zh-cn|{{{2}}}}} }}{{#if: {{{deprecated|}}} | </del> }}{{#if: {{{since|}}} | &nbsp;{{{{{since}}} add}} }}{{#if: {{{only|}}} | &nbsp;{{{{{only}}} only}} }} {{#if: {{{also|}}} | &nbsp;{{{{{also}}} also}} }} {{#if: {{{dx8|}}} | &nbsp;{{Dx8}} }} {{#if: {{{dx9|}}} | &nbsp;{{Dx9}} }} {{#if: {{{deprecated|}}} | &nbsp;{{obs}} }}
: {{#if: {{{deprecated|}}} | 已作废。&nbsp; }} {{#if: {{{3|}}} | {{{3}}} }}</onlyinclude>
: {{#if: {{{deprecated|}}} | 已作废。&nbsp; }} {{#if: {{{3|}}} | {{{3}}} }}</onlyinclude>

Revision as of 18:32, 21 April 2025

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

基本用法

{{MatParam:zh-cn|名称|变量类型|描述}}

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

预设的参数

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

参见


{{{1}}}