X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=image.h;h=04d33378ff1be29f4a6610dc2b97b37103c2d91f;hp=60fbcce681c1aa93311efc3d4e3e1dd6f61de373;hb=b252f6823904f7cddfe55fb81b86aed8fed27204;hpb=4e85279d2ec63bc45263ed22105e20774a731182 diff --git a/image.h b/image.h index 60fbcce6..04d33378 100644 --- a/image.h +++ b/image.h @@ -50,8 +50,10 @@ void Image_FixTransparentPixels_f(void); extern cvar_t r_fixtrans_auto; #define Image_LinearFloatFromsRGB(c) (((c) < 11) ? (c) * 0.000302341331f : (float)pow(((c)*(1.0f/256.0f) + 0.055f)*(1.0f/1.0555f), 2.4f)) +#define Image_sRGBFloatFromLinear(c) (((c) < 1) ? (c) * 0.05046875f : 1.055f * (float)pow((c)*(1.0f/256.0f), 1.0f/2.4f) - 0.055f) void Image_MakeLinearColorsFromsRGB(unsigned char *pout, const unsigned char *pin, int numpixels); +void Image_MakesRGBColorsFromLinear(unsigned char *pout, const unsigned char *pin, int numpixels); #endif