summaryrefslogtreecommitdiffstats
path: root/math.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'math.cginc')
-rw-r--r--math.cginc6
1 files changed, 4 insertions, 2 deletions
diff --git a/math.cginc b/math.cginc
index 436cc56..2f05054 100644
--- a/math.cginc
+++ b/math.cginc
@@ -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