diff options
| author | yum <yum.food.vr@gmail.com> | 2024-11-02 18:10:15 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-11-02 18:15:00 -0700 |
| commit | 33209b34e2d6b9af2fbc3cd0886a3eb76479a9d2 (patch) | |
| tree | 4b71ad4676e16fa412b706b8563f8e8740e4d246 /math.cginc | |
| parent | 76af070567daeb845cabbf9a414cf487b88c12f9 (diff) | |
Fog uses interleaved gradient noise instead of white noise
This lets us use a much higher step size before noise becomes too gross
to look at.
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -13,6 +13,11 @@ // 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))) +float golden_lds(uint i) +{ + return glsl_mod(1.61803398875 * float(i), 1); +} + // Complex numbers typedef float2 complex; |
