Skip to content

Instantly share code, notes, and snippets.

@twobob
Created December 1, 2015 02:19
Show Gist options
  • Save twobob/862cdf5bd83a2e508644 to your computer and use it in GitHub Desktop.
Save twobob/862cdf5bd83a2e508644 to your computer and use it in GitHub Desktop.
const float2 r = float2(
23.1406926327792690, // e^pi (Gelfond's constant)
2.6651441426902251); // 2^sqrt(2) (Gelfond–Schneider constant)
return frac( cos( fmod( 12345678., 1e-7 + 256. * dot(p,r) ) ) );
// Random, enjoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment