2 Commits
Author SHA1 Message Date
klemek 862a620f92 chore: update glsl-glyphs 2026-11-11 18:02:56 +01:00
klemek ba13569696 fix: perlin 2026-11-10 01:44:27 +01:00
2 changed files with 8 additions and 2 deletions

No files matched your search

+7 -1
View File
@@ -180,13 +180,19 @@ float noise_f(vec2 n, int f)
vec2 perlin_gradient(vec2 p, int seed)
{
return normalize(
vec2 v = normalize(
vec2(
rand(p.x * 12.34 + p.y * 56.78 + seed) * 2.0 - 1.0,
rand(p.x * 56.78 + p.y * 12.34 + seed) * 2.0 - 1.0
)
);
if (length(v) == 0.) {
return vec2(1, 0);
}
return v;
}
float perlin(vec2 p, int seed)