Skip to content

Instantly share code, notes, and snippets.

View umarquez's full-sized avatar

Uriel Márquez umarquez

View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 28, 2025 11:55
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
https://gcc.gnu.org/
https://stackoverflow.com/questions/43580131/exec-gcc-executable-file-not-found-in-path-when-trying-go-build
gcc (the GNU Compiler Collection) provides a C compiler.
On Windows, install TDM-GCC(http://tdm-gcc.tdragon.net/download). The github.com/miekg/pkcs11 package uses cgo.
Cgo enables the creation of Go packages that call C code.
System Variables > PATH > add "C:\TDM-GCC-64\bin"