summaryrefslogtreecommitdiffstats
path: root/math.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-06-25 19:35:35 -0700
committeryum <yum.food.vr@gmail.com>2024-06-25 19:35:35 -0700
commit312d7acc39b4dc33edd3fdc3d3d77d373b5cb198 (patch)
treec4b73a8317699055fc46d9c33b490fac8e9d8db6 /math.cginc
parent9b1523dce73e803c822d33e2529f2836dcc8ef7f (diff)
Add glitter option to rim lighting
Now rim lighting can illuminate the avatar as if it has glitter on it. Also deprecate glitter seed, since it was unused.
Diffstat (limited to 'math.cginc')
-rw-r--r--math.cginc4
1 files changed, 3 insertions, 1 deletions
diff --git a/math.cginc b/math.cginc
index 747c5c2..59e6fa0 100644
--- a/math.cginc
+++ b/math.cginc
@@ -51,7 +51,9 @@ float rand(uint seed) {
// Generate a random number on [0, 1].
float rand2(float2 p)
{
- return glsl_mod(sin(dot(p, float2(561.0, 885.0))) * 776.2, 1.0);
+ return frac(sin(dot(p,
+ float2(12.9898, 78.233)))
+ * 43758.5453123);
}
// Generate a random number on [0, 1].