From 05b86c0505617962685b5ce9112d04c1bc251a60 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Fri, 14 Feb 2014 02:52:22 -0800 Subject: OpenGL2: Fix bug in ColorToRGBM(). --- src/renderergl2/tr_bsp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); -- cgit