User:Deprecated/Template:DeprecatedTest: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added fifth value for scale parameters, documented usage)
(Blanked)
 
(57 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>A template for use in [[Sky List]] tables for the brightness and ambience table cells.


==Documentation==
This template accepts up to five parameters. The first four parameters should be the standard color and brightness values from the {{ent|light_environment}}, while the fifth value (optional) should be the {{Hover info|BrightnessScaleHDR or AmbientScaleHDR|HDR scale}} for the brightness or ambience. The first three parameters are used to fill in the background color of the table cell that the Skycell template is used in.
{{note|If the HDR brightness and ambience values are -1 -1 -1 1, use the [[Template:Vec4]] or [[Template:Vec5]] templates instead. This is because this template will color the background completely black with those values. This is undesired, as those values tell HDR to use the same values as LDR.}}
== Example ==
<code><nowiki>| {{skycell|252|231|167|700}}</nowiki></code>
<code><nowiki>| {{skycell|144|175|198|150}}</nowiki></code>
These skycell templates are used in the Sky table below. To see where and how they are used, check this page's source.
{| class="standard-table" style="width: 100%; text-align: center;"
!colspan="8"| sky_ep02_01_hdr <br /> [[Image:sky_ep02_01.jpg]]
|-
{{SkylistTableCaption|layout = old}}
|-
| ep2_background01
| {{vec3|0|145|0}}
| -35
| {{skycell|252|231|167|700}}
| {{skycell|144|175|198|150}}
| {{vec5|-1|-1|-1|1|(.6)}}
| {{vec5|-1|-1|-1|1|(.5)}}
| 1
|}
</noinclude><includeonly>style="background: rgb({{{1}}}, {{{2}}}, {{{3}}}); color: {{#ifexpr:({{{1}}}+{{{2}}}+{{{3}}})/3<128|white|black}};"|{{{1}}}&nbsp;{{{2}}}&nbsp;{{{3}}}&nbsp;{{{4}}}&nbsp;{{{5}}}</includeonly>

Latest revision as of 15:49, 24 February 2020