summaryrefslogtreecommitdiffstats
path: root/math.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'math.cginc')
-rw-r--r--math.cginc5
1 files changed, 5 insertions, 0 deletions
diff --git a/math.cginc b/math.cginc
index 8aaa5ea..d7656e1 100644
--- a/math.cginc
+++ b/math.cginc
@@ -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;