X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_shared.c;h=84129cba3d944279bf04107fa5f917cce1b10da9;hp=0ffc36287966bdd97a2042747df1952459a21795;hb=cfdb5e3a8a32fc197877a86e1774d1bc4dbd6cc1;hpb=6ad9cece24f83d3cea1b1f161eccb188daa01fe3 diff --git a/vid_shared.c b/vid_shared.c index 0ffc3628..84129cba 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -773,15 +773,15 @@ void VID_UpdateGamma(qboolean force, int rampsize) if (cachecolorenable) { - BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[0]), cachewhite[0], cacheblack[0], vid_gammaramps); - BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[1]), cachewhite[1], cacheblack[1], vid_gammaramps + vid_gammarampsize); - BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[2]), cachewhite[2], cacheblack[2], vid_gammaramps + vid_gammarampsize*2); + BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[0]), cachewhite[0], cacheblack[0], vid_gammaramps, rampsize); + BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[1]), cachewhite[1], cacheblack[1], vid_gammaramps + vid_gammarampsize, rampsize); + BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[2]), cachewhite[2], cacheblack[2], vid_gammaramps + vid_gammarampsize*2, rampsize); } else { - BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, vid_gammaramps); - BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, vid_gammaramps + vid_gammarampsize); - BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, vid_gammaramps + vid_gammarampsize*2); + BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, vid_gammaramps, rampsize); + BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, vid_gammaramps + vid_gammarampsize, rampsize); + BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, vid_gammaramps + vid_gammarampsize*2, rampsize); } // LordHavoc: this code came from Ben Winslow and Zinx Verituse, I have