From b377dd05175d5bffaeef9c55051cd396c127daef Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 20 Mar 2025 18:57:24 -0700 Subject: Add false color visualizer Based on Sotalo's Furality talk - I wanted a way to visualize when my albedo is outside the recommended [0.025, 90]% brightness range. This feature does that. Dark is rendered red, bright is rendered blue. --- math.cginc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'math.cginc') 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 -- cgit v1.2.3