diff options
| author | yum <yum.food.vr@gmail.com> | 2024-11-05 21:37:05 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-11-05 21:37:05 -0800 |
| commit | 23ed2a68de0d1d9c4538e71b05b87b791d30459f (patch) | |
| tree | 8e6947714e3927e15cf140b2662d59457cb7deb2 /math.cginc | |
| parent | c137315f90aa4658f0729bdc73400e1c11be350d (diff) | |
Fog cleanup
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -136,6 +136,11 @@ float dsaturate(float x, float k) return dmin(dmax(x, 0, k), 1, k); } +float dclamp(float x, float lo, float hi, float k) +{ + return dmin(dmax(x, lo, k), hi, k); +} + float rand(uint seed) { seed = seed * 747796405 + 2891336453; uint result = ((seed >> ((seed >> 28) + 4)) ^ seed) * 277803737; |
