diff options
| author | yum <yum.food.vr@gmail.com> | 2024-09-28 01:46:34 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-09-28 01:46:34 -0700 |
| commit | db11ed0901600e316ac54c2e2d8fdeec46c8af68 (patch) | |
| tree | 04d796108edbbd3594b97c8e7889c76affcba103 /math.cginc | |
| parent | 7842e7db948fb46b17afa0ccc63a8807b2269b6c (diff) | |
Add letter grid gimmick
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -113,5 +113,15 @@ float fbm(float3 p, const int n_octaves, float w) return res; } +float median(float x, float y, float z) +{ + return max(min(x, y), min(max(x, y), z)); +} + +float median(float3 x) +{ + return median(x.x, x.y, x.z); +} + #endif // __MATH_INC |
