diff options
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_color.h | 5 | ||||
-rw-r--r-- | intern/cycles/util/util_types.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h index a11a5c7c2a7..8b4a175f498 100644 --- a/intern/cycles/util/util_color.h +++ b/intern/cycles/util/util_color.h @@ -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__ */ diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h index 12ae60f1143..af5b91c963a 100644 --- a/intern/cycles/util/util_types.h +++ b/intern/cycles/util/util_types.h @@ -30,6 +30,7 @@ #ifndef __KERNEL_GPU__ #define __device static inline +#define __device_noinline static #define __global #define __local #define __shared |