Template:Shader Name: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 10: Line 10:
|#default=Shader-ball.png
|#default=Shader-ball.png
|param=Shader-ball-settings.png}}|15px]]
|param=Shader-ball-settings.png}}|15px]]
</span></span><code style="background-color:rgba(221,78,78,.25); border-radius: {{#ifeq: {{{type}}} | param | {{#if: {{{2|}}} | 0 | 0 4px 4px 0 }} | 0 4px 4px 0}}; color:#CCC; padding:0 4px; {{#if:{{{select|}}}|user-select:{{{select}}}|}}">{{#ifexist:{{{1}}}|[[{{{1}}}]]|{{{1}}}}}</code><!--
</span></span><code style="background-color:rgba(221,78,78,.25); border-radius: {{#ifeq: {{{type}}} | param | {{#if: {{{2|}}} | 0 | 0 4px 4px 0 }} | 0 4px 4px 0}}; color:#CCC; padding:0 4px; {{#if:{{{select|}}}|user-select:{{{select}}}|}}">{{#ifexist:{{{1}}}|[[{{{1}}}|{{{alt|{{{1}}}}}}]]|{{{1}}}}}</code><!--
-->{{#ifeq: {{{type}}} | param | {{#if: {{{2|}}}|<code style="background-color:rgba(123,42,42,.30); border-radius:0 4px 4px 0; color:#CCC; padding:0 4px; {{#ifexist:{{{2}}}||pointer-events:none}}">{{#ifexist:{{{2}}}|[[{{{2}}}]]|{{{2}}}}}</code>|}} | }}</span><!--
-->{{#ifeq: {{{type}}} | param | {{#if: {{{2|}}}|<code style="background-color:rgba(123,42,42,.30); border-radius:0 4px 4px 0; color:#CCC; padding:0 4px; {{#ifexist:{{{2}}}||pointer-events:none}}">{{#ifexist:{{{2}}}|[[{{{2}}}]]|{{{2}}}}}</code>|}} | }}</span><!--
--></onlyinclude></includeonly>
--></onlyinclude></includeonly>


[[Category:Formatting templates]]
[[Category:Formatting templates]]

Revision as of 10:12, 11 January 2024

Todo: Make automatic icon selection

Based on Template:Path ( 🖿Path )

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Shader name/param

Parameters and Examples

Parameter Description Examples Preview
{{{1}}} Shader / parameter name
{{shader|UnlitGeneric}}
{{{2}}} Value.
Works only if type is param
{{shader|type=param|$detail|texture}}
{{shader|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|key|value}}
{{shader|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|Water (shader)|alt=Water}}