mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-03-04 23:30:56 +00:00
OpenGL2: Fix bug in ColorToRGBM().
This commit is contained in:
parent
79e9baedf8
commit
7a23bb1c59
1 changed files with 2 additions and 0 deletions
|
@ -165,6 +165,8 @@ void ColorToRGBM(const vec3_t color, unsigned char rgbm[4])
|
||||||
vec3_t sample;
|
vec3_t sample;
|
||||||
float maxComponent;
|
float maxComponent;
|
||||||
|
|
||||||
|
VectorCopy(color, sample);
|
||||||
|
|
||||||
maxComponent = MAX(sample[0], sample[1]);
|
maxComponent = MAX(sample[0], sample[1]);
|
||||||
maxComponent = MAX(maxComponent, sample[2]);
|
maxComponent = MAX(maxComponent, sample[2]);
|
||||||
maxComponent = CLAMP(maxComponent, 1.0f/255.0f, 1.0f);
|
maxComponent = CLAMP(maxComponent, 1.0f/255.0f, 1.0f);
|
||||||
|
|
Loading…
Reference in a new issue