Material vector

From Valve Developer Community
Revision as of 04:25, 26 April 2010 by TomEdwards (talk | contribs) (Created page with 'A '''material vector''' is a collection of values used with some material commands. They most often represent an RGB color. == Syntax == $scale "[1 1]" $color…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A material vector is a collection of values used with some material commands. They most often represent an RGB color.

Syntax

$scale "[1 1]"
$color "[1 1 1]"
$color "{255 255 255}"
$envmaptint "{100 0 58}"
  • Quotes are always required, because there are spaces in the value
  • Values inside [square brackets] are normals
  • Values inside {curly brackets} are absolute (the range for colors is 0-255)
Todo: Is there a limit on the number of components?

Accessing

Access an individual component of a material vector like this:

$my_vector[0]
$my_vector[1]
// etc.