Skip to content

Instantly share code, notes, and snippets.

View bostelk's full-sized avatar
🍜

Kyle Bostelmann bostelk

🍜
View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 6, 2024 09:32
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);
commit 15c0d164567f1aaae4c94ce5b1225eb6e4e9e232
Author: Fabian Giesen
Date: Wed Nov 5 18:50:24 2014 -0800
cdep: Added missing punchline, as per Casey's request.
[p4:50832]
diff --git a/utils/cdep/cdep_context.cpp b/utils/cdep/cdep_context.cpp
index 443352e..adeb5b8 100644
--- a/utils/cdep/cdep_context.cpp
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#define cast(t,p) ((t)(p))
#define szof(a) ((int)sizeof(a))