From a396182815db14f5a6eed26799dd425506a70686 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 8 Oct 2024 17:32:09 -0700 Subject: Add fog parameters; add Unity fog to fwd/add passes --- math.cginc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'math.cginc') diff --git a/math.cginc b/math.cginc index 46e19e1..968f888 100644 --- a/math.cginc +++ b/math.cginc @@ -3,6 +3,13 @@ #ifndef __MATH_INC #define __MATH_INC +// Hacky parameterizable whiteout blending. Probably some big mistakes but it +// passes the eyeball test. +// At w=0.5, this looks kinda like whiteout blending. +// At w=0, this returns n0. +// At w=1, this returns n1. +#define MY_BLEND_NORMALS(n0, n1, w) normalize(float3((n0.xy * (1 - w) + n1.xy * w), lerp(1, n0.z, (1-w)) * lerp(1, n1.z, w))) + // Complex numbers typedef float2 complex; -- cgit v1.2.3