diff options
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -194,6 +194,8 @@ float3 blendNormalsHill12(float3 n0, float3 n1) { return normalize(n0 * dot(n0, n1) - n1 * n0.z);
}
-#endif // __MATH_INC
-
+float3 luminance(float3 color) {
+ return dot(color, float3(0.2126, 0.7152, 0.0722));
+}
+#endif // __MATH_INC
|
