summaryrefslogtreecommitdiffstats
path: root/math.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-02-26 14:21:05 -0800
committeryum <yum.food.vr@gmail.com>2026-02-26 14:21:05 -0800
commit75439d0d6437a10b00b240aba75e9f12de20150b (patch)
treeaf30dceabad1b486f6411c8e89e3656887e55fff /math.cginc
parent5460dbc62fe6f404cb244410af949864cce286f5 (diff)
Add emissions, remove impostor code
Diffstat (limited to 'math.cginc')
-rwxr-xr-xmath.cginc5
1 files changed, 5 insertions, 0 deletions
diff --git a/math.cginc b/math.cginc
index 3d7e92e..e2d4169 100755
--- a/math.cginc
+++ b/math.cginc
@@ -100,5 +100,10 @@ float3 blendNormalsHill12(float3 n0, float3 n1) {
return normalize(n0 * dot(n0, n1) - n1 * n0.z);
}
+// https://en.wikipedia.org/wiki/Relative_luminance
+float luminance(float3 rgb) {
+ return dot(float3(0.2126, 0.7152, 0.0722), rgb);
+}
+
#endif // __MATH_INC