From: divverent Date: Fri, 21 Oct 2011 10:23:12 +0000 (+0000) Subject: fix another typo in sRGB conversion X-Git-Tag: xonotic-v0.6.0~163^2~102 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=42c9a66eb6bc09e85ba90853758968ddd0678231;p=xonotic%2Fdarkplaces.git fix another typo in sRGB conversion git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11455 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/image.h b/image.h index 1bca793c..66b679df 100644 --- a/image.h +++ b/image.h @@ -49,7 +49,7 @@ void Image_HeightmapToNormalmap_BGRA(const unsigned char *inpixels, unsigned cha void Image_FixTransparentPixels_f(void); extern cvar_t r_fixtrans_auto; -#define Image_LinearFloatFromsRGB(c) (((c) <= 10.3552f) ? (c) * 0.000302341331f : (float)pow(((c)*(1.0f/256.0f) + 0.055f)*(1.0f/1.0555f), 2.4f)) +#define Image_LinearFloatFromsRGB(c) (((c) <= 10.3552f) ? (c) * 0.000302341331f : (float)pow(((c)*(1.0f/256.0f) + 0.055f)*(1.0f/1.055f), 2.4f)) #define Image_sRGBFloatFromLinear(c) (((c) < 0.8014848f) ? (c) * 0.05046875f : 1.055f * (float)pow((c)*(1.0f/256.0f), 1.0f/2.4f) - 0.055f) #define Image_sRGBFloatFromLinear_Lightmap(c) (Image_sRGBFloatFromLinear(c*2.0f)*0.5f)