mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-04 18:40:51 +00:00
Round, rather than truncate.
This commit is contained in:
parent
a3215e4dd0
commit
f2435b8a64
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ VID_InitGamma (unsigned char *pal)
|
||||||
|
|
||||||
Cvar_SetFlags (vid_gamma, vid_gamma->flags | CVAR_ROM);
|
Cvar_SetFlags (vid_gamma, vid_gamma->flags | CVAR_ROM);
|
||||||
for (i = 0; i < 256; i++) { // Create the gamma-correction table
|
for (i = 0; i < 256; i++) { // Create the gamma-correction table
|
||||||
v = (int) (255.0 * pow ((double) i / 255.0, g));
|
v = (int) (255.0 * pow ((double) i / 255.0, g) + 0.5);
|
||||||
gammatable[i] = bound (0, v, 255);
|
gammatable[i] = bound (0, v, 255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue