Compare commits
2
Commits
1c6cadd4c6
...
862a620f92
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
862a620f92 | ||
|
|
ba13569696 |
No files matched your search
@@ -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)
|
||||
|
||||
+1
-1
Submodule glsl-glyphs updated: 14230bd489...16b52e8fc7.
Reference in new issue
Block a user