A collection of GLSL procedural noise functions (Perlin, simplex, Worley) for WebGL with no external dependencies.
webgl-noise is a library of GLSL procedural noise functions for use in WebGL and OpenGL shaders. It provides implementations of simplex noise, classic Perlin noise, and Worley noise across 2D, 3D, and 4D dimensions, all without requiring external texture data. It solves the problem of generating procedural noise directly on the GPU in a self-contained and portable manner.
Graphics programmers and developers working with WebGL, OpenGL, or OpenGL ES who need procedural noise for shader effects, terrain generation, texture synthesis, or visual simulations.
Developers choose webgl-noise because it offers dependency-free noise functions that work in constrained shader environments (like vertex shaders), are highly portable across GPU platforms, and can efficiently utilize ALU resources alongside texture-heavy rendering pipelines.
GLSL procedural noise functions compatible with WebGL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Functions require no external texture lookups or data, enabling use in vertex shaders and environments without texture support, as emphasized in the README for scalability and convenience.
Works on OpenGL 2.1+, OpenGL ES 2.x, and WebGL 1.0 with only high precision floats, making it highly portable across diverse GPU hardware, as stated in the compatibility notes.
Includes 2D, 3D, and 4D simplex noise, classic Perlin noise with periodic options, and Worley noise, providing flexibility for effects like terrain generation or organic textures.
Designed to leverage unused ALU resources in GPU pipelines, efficiently running alongside texture-intensive rendering without competing for bandwidth, per the library's philosophy.
The included C demo uses deprecated GLFW 2.x and old OpenGL 2.1 calls, making it difficult to compile and not useful for modern development, as admitted in the README.
Newer, faster versions of 2D and 3D simplex noise exist in a separate repository (psrdnoise), meaning this library isn't the latest for core noise types, though it retains unique features like 4D noise.
Requires `precision highp float` in shaders, which may not be available on all OpenGL ES or WebGL platforms, potentially limiting compatibility in constrained environments.