summaryrefslogtreecommitdiffstats
path: root/thirdparty/embree/common/math/color.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree/common/math/color.h')
-rw-r--r--thirdparty/embree/common/math/color.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/thirdparty/embree/common/math/color.h b/thirdparty/embree/common/math/color.h
index e62e4ad2a4..8b28ff9447 100644
--- a/thirdparty/embree/common/math/color.h
+++ b/thirdparty/embree/common/math/color.h
@@ -3,6 +3,10 @@
#pragma once
+#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
+# include "color_sycl.h"
+#else
+
#include "constants.h"
#include "col3.h"
#include "col4.h"
@@ -64,6 +68,10 @@ namespace embree
d.b = (unsigned char)(s[2]);
d.a = (unsigned char)(s[3]);
}
+ __forceinline void set(float &f) const
+ {
+ f = 0.2126f*r+0.7125f*g+0.0722f*b; // sRGB luminance.
+ }
////////////////////////////////////////////////////////////////////////////////
/// Constants
@@ -256,3 +264,5 @@ namespace embree
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
}
}
+
+#endif