Last active
April 20, 2017 00:34
-
-
Save jhnsnc/e8403af08af60313f3f671d272e8dd5d to your computer and use it in GitHub Desktop.
GLSL Function Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sineless hash - Dave Hoskins ( https://www.shadertoy.com/view/4djSRW ) | |
// License: CC BY-SA v4.0 (this function only) | |
float hash11(float p) | |
{ | |
const float HASHSCALE1 = .1031; | |
vec3 p3 = fract(vec3(p) * HASHSCALE1); | |
p3 += dot(p3, p3.yzx + 19.19); | |
return fract((p3.x + p3.y) * p3.z); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment