A curated list of common noises and patterns in computer graphics. Mostly taken from implementations on Shadertoy. All implementations are under the MIT or similar.
This library is intended for users who need access to raw, unprocessed noise values in Rust. This is not intended to be an effect or post processing library. All returned values are between [-1..1] or [0..1] as indicated.
Noise classes support both raw noises as well as smooth FBM variants.
This library is mostly a port of GPU noise and pattern implementations indended for computer graphics applications and games. If you need highest quality noise implementations you may have to look elsewhere.
This library uses the nalgebra-glm crate as the math library (and is also its only dependency). The API however has no external dependencies.
Precision
By default the library compiles to f32 you can change the values in lib.rs as instructed and compile the library to ```f64`` if needed.
The Traits
The traits for noises and patterns are very simple. Noises are currently 2D only, 3D coming later.
Noises
Value Noise
Based on 1D, 2D & 3D Value Noise
let mut pixels = vec!;
let value = new;
for y in 0..height
Patterns
Bricks
let mut pixels = vec!;
let bricks = new;
for y in 0..height
TODO Support the various brick parameters.