diff options
author | SmileTheory <SmileTheory@gmail.com> | 2014-02-14 02:52:22 -0800 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:39 +0100 |
commit | 05b86c0505617962685b5ce9112d04c1bc251a60 (patch) | |
tree | a29f6256b2c42fb9047ca58d304bfce1bcb078bf | |
parent | 0df612b754067973315d33531bbc8c4dcd9b260a (diff) |
OpenGL2: Fix bug in ColorToRGBM().
-rw-r--r-- | src/renderergl2/tr_bsp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c index 0e018ca2..ee0dc516 100644 --- a/src/renderergl2/tr_bsp.c +++ b/src/renderergl2/tr_bsp.c @@ -166,6 +166,8 @@ void ColorToRGBM(const vec3_t color, unsigned char rgbm[4]) vec3_t sample; float maxComponent; + VectorCopy(color, sample); + maxComponent = MAX(sample[0], sample[1]); maxComponent = MAX(maxComponent, sample[2]); maxComponent = CLAMP(maxComponent, 1.0f/255.0f, 1.0f); |