RGB: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
Note the quote marks.
Note the quote marks.


The numbers represent RGB in order; unfortunately while they are sometimes [[normal]]s, they can also at times represent a range from 0 to 255 (LDR) or from 0 to infinity (HDR).
The numbers represent RGB in order; unfortunately while they are sometimes [[normal]]s, they can also at times represent multipliers of an existing value.


== See also ==
== See also ==


*[[Wikipedia:RGB]]
*[[Wikipedia:RGB]]

Revision as of 08:54, 15 July 2008

RGB stands for red, green, blue. In a TGA or VTF, each pixel of the image is defined by three bytes that define how much red, green, and blue light are added together to produce the color in that pixel. The three separate values for each color are called channels. Shaders in Source can manipulate each channel individually to produce color effects.

Image files can also have a fourth channel, called alpha, which can define other information for each pixel, usually opacity.

RGB Matrix

In several places Source encodes RGB data in an RGB matrix that looks like this:

"[1 1 1]"

Note the quote marks.

The numbers represent RGB in order; unfortunately while they are sometimes normals, they can also at times represent multipliers of an existing value.

See also