CColorMap: Difference between revisions
From Spring
Jump to navigationJump to search
m Game development -> Game Dev |
|||
| Line 12: | Line 12: | ||
'''ColorMaps''' usually describe how the colours of an entity will shift during its lifetime, where the first colour will be used at the beginning and then cycle through all colours until the last one is used at the end of its lifetime. | '''ColorMaps''' usually describe how the colours of an entity will shift during its lifetime, where the first colour will be used at the beginning and then cycle through all colours until the last one is used at the end of its lifetime. | ||
[[Category:Game | [[Category:Game Dev]] | ||
Revision as of 21:12, 25 March 2013
A ColorMap is a collection of 2 or more RGBA colours. They can be expressed either as a string of decimal numbers, or pointing to an image file where each pixel will be used as a colour.
Example:
This gives a ColorMap with 2 colours, the first one blue and second one white:
colorMap = "1.0 0.0 0.0 0.0 1.0 1.0 1.0 0.0",
Or it can be pointed to a bitmap file:
colorMap = "bitmap_file.tga",
ColorMaps usually describe how the colours of an entity will shift during its lifetime, where the first colour will be used at the beginning and then cycle through all colours until the last one is used at the end of its lifetime.