Template:Shader/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Updated due to the expansion of functionality)
mNo edit summary
Line 24: Line 24:
| {{Capsule|margin=5px| {{Shader_Name|key|value}} }} {{Capsule|margin=5px| {{Shader_Name|type=param|key|value}} }}
| {{Capsule|margin=5px| {{Shader_Name|key|value}} }} {{Capsule|margin=5px| {{Shader_Name|type=param|key|value}} }}
|-
|-
| align=center | {{Param|alt}}
| This displays alternate text for the {{param|1}} parameter. Useful when wanting to make the link to the, for example, [[Water (shader)]] shader look more formal.
| {{CodeBlock|margin=5px| <nowiki>{{Shader Name|Water (shader)|alt=Water}}</nowiki>}}
| {{Capsule|margin=5px| {{Shader Name|Water (shader)|alt=Water}} }}
|}
|}

Revision as of 10:15, 11 January 2024

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

Shader name/param

Parameters and Examples

Parameter Description Examples Preview
{{{1}}} Shader / parameter name
{{Shader_Name|UnlitGeneric}}
{{{2}}} Value.
Works only if type is param
{{Shader_Name|type=param|$detail|texture}}
{{Shader_Name|type=param|$detail|notexisting}}
Shader-ball-settings.png $detailnotexisting
{{{type}}} At the moment it has one value - param. Param sets shader parameter icon and unlock 3rd field.
{{Shader_Name|key|value}}
{{Shader_Name|type=param|key|value}}
Shader-ball.png key
Shader-ball-settings.png keyvalue
{{{alt}}} This displays alternate text for the {{{1}}} parameter. Useful when wanting to make the link to the, for example, Water (shader) shader look more formal.
{{Shader Name|Water (shader)|alt=Water}}