weird: added another iteration of ikeda games; utils: added a perlin noise-like noise function

This commit is contained in:
2017-06-09 18:41:01 -04:00
parent 95f6ab8c6b
commit 478cf7b56a
2 changed files with 46 additions and 0 deletions

View File

@@ -3,3 +3,9 @@ float random(vec2 st) {
vec2(12.9898,78.233)))*
43758.5453123);
}
float noise(float x) {
float i = floor(x);
float f = fract(x);
return mix(rand(i), rand(i + 1.0), smoothstep(0.,1.,f));
}