Skip to content

Instantly share code, notes, and snippets.

View Debabrata-Giri-2001's full-sized avatar
🎯
Focusing

Debabrata Giri Debabrata-Giri-2001

🎯
Focusing
View GitHub Profile
vec2 rotate(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(c, s, -s, c);
return m * v;
}
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active December 7, 2025 11:08
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);