Skip to content

Commit

Permalink
OpenGL2: Fix bug in ColorToRGBM().
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileTheory committed Feb 14, 2014
1 parent 79e9bae commit 7a23bb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/renderergl2/tr_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,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);
Expand Down

0 comments on commit 7a23bb1

Please sign in to comment.