$color

From Valve Developer Community
Revision as of 11:55, 15 July 2008 by TomEdwards (talk | contribs)
Jump to navigation Jump to search

$color independently scales the red, green and blue channels of an albedo.

$color "[<red float> <green float> <blue float>]"

Quote marks are required. The default value is [1 1 1].

Solid color

This parameter can be used without an albedo to display a solid color without the need of a texture (except a %tooltexture). As well as a small saving in performance and memory footprint, material_modify_control can be used to completely change the material's color at run-time if desired.

In this scenario, [1 1 1] is pure white.

Tip.pngTip:If the material is representing empty blackness, you will probably want to use the UnlitGeneric shader to prevent it from ever becoming grey.