convert lightmaps to sRGB for nice sRGB support
[xonotic/darkplaces.git] / image.h
diff --git a/image.h b/image.h
index 60fbcce..04d3337 100644 (file)
--- 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