Skip to content

Instantly share code, notes, and snippets.

@fuqunaga
Created March 9, 2019 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuqunaga/f643b1eef3f7d674258283aacb23368c to your computer and use it in GitHub Desktop.
Save fuqunaga/f643b1eef3f7d674258283aacb23368c to your computer and use it in GitHub Desktop.
vec2 rand2n() {
seed+=vec2(-1,1);
// implementation based on: lumina.sourceforge.net/Tutorials/Noise.html
return vec2(fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453),
fract(cos(dot(seed.xy ,vec2(4.898,7.23))) * 23421.631));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment