Cycles: svn merge -r39870:r40266 https://svn.blender.org/svnroot/bf-blender/trunk...
[blender-staging.git] / intern / cycles / util / util_color.h
index a11a5c7c2a75bc6ef6f159786b6a310e3810e7c7..8b4a175f49879954fdaeab681425f3900ece18d6 100644 (file)
@@ -60,6 +60,11 @@ __device float3 color_scene_linear_to_srgb(float3 c)
 
 #endif
 
+__device float linear_rgb_to_gray(float3 c)
+{
+       return c.x*0.2126f + c.y*0.7152f + c.z*0.0722f;
+}
+
 CCL_NAMESPACE_END
 
 #endif /* __UTIL_COLOR_H__ */