Skip to content

Instantly share code, notes, and snippets.

View mengusfungus's full-sized avatar

mengusfungus

View GitHub Profile
@mengusfungus
mengusfungus / GLSL-Noise.md
Created October 11, 2025 02:44 — forked from patriciogonzalezvivo/GLSL-Noise.md
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);
#ifndef NOISE_SIMPLEX_FUNC
#define NOISE_SIMPLEX_FUNC
/*
Description:
Array- and textureless CgFx/HLSL 2D, 3D and 4D simplex noise functions.
a.k.a. simplified and optimized Perlin noise.
The functions have very good performance
and no dependencies on external data.
@mengusfungus
mengusfungus / Wikipedia_character_frequencies.txt
Created May 22, 2024 06:31 — forked from aesuli/Wikipedia_character_frequencies.txt
Unicode character frequencies computed on dumps of all wikipedia languages
# Unicode character frequencies computed on dumps of all wikipedia languages (288)
# Dumps downloader: https://github.com/aesuli/wikipediatools
# Html converted to plain text: https://github.com/aesuli/wikipedia-extractor
#
# Andrea Esuli
# http://www.esuli.it/
#
#'char'<tab>ord(char)<tab>freq
' ' 32 6098823328
'e' 101 3226481962