]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/mathlib.h
Increase the influence of directional lights on the deluxemap by a)Ignoring angle...
[xonotic/netradiant.git] / libs / mathlib.h
index bbf026d452e6c5825b463bcc3ed73b72c1b1d9b2..c2e2ed7589835a08ac4b750a4aa1c552449a4229 100644 (file)
@@ -77,6 +77,8 @@ extern const vec3_t g_vec3_axis_z;
 #define FLOAT_SNAP(f,snap) ( (float)( floor( (f) / (snap) + 0.5 ) * (snap) ) )
 #define FLOAT_TO_INTEGER(f) ( (float)( floor( (f) + 0.5 ) ) )
 
+#define RGBTOGRAY(x) ( (x)[0] * 0.2989f + (x)[1] * 0.5870f + (x)[2] * 0.1140f )
+
 #define Q_rint(in) ((vec_t)floor(in+0.5))
 
 qboolean VectorCompare (const vec3_t v1, const vec3_t v2);