diff options
| author | yum <yum.food.vr@gmail.com> | 2024-10-08 17:32:09 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-10-08 17:32:09 -0700 |
| commit | a396182815db14f5a6eed26799dd425506a70686 (patch) | |
| tree | 38f1d2ca8cb3cd6bd8b87fdcb2678ac2e911e90b /math.cginc | |
| parent | bcadf1d091efe76e7a1b2393f87f7e24128b723b (diff) | |
Add fog parameters; add Unity fog to fwd/add passes
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |
