MCPcopy Index your code
hub / github.com/Auburn/FastNoiseLite

github.com/Auburn/FastNoiseLite @v1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.1 ↗ · + Follow
511 symbols 1,033 edges 8 files 157 documented · 31% updated 16d agov1.1.1 · 2024-03-05★ 3,45020 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

discord

FastNoise Lite

Web Preview App

FastNoise Lite is an extremely portable open source noise generation library with a large selection of noise algorithms. This library focuses on high performance while avoiding platform/language specific features, allowing for easy ports to as many possible languages.

This project is an evolution of the original FastNoise library and shares the same goal: An easy to use library that can quickly be integrated into a project and provides performant modern noise generation. See a breakdown of changes from the transition to FastNoise Lite here

If you are looking for a more extensive noise generation library consider using FastNoise2. It provides large performance gains thanks to SIMD and uses a node graph structure to allow complex noise configurations with lots of flexibility.

Features

  • 2D & 3D sampling
  • OpenSimplex2 noise
  • OpenSimplex2S noise
  • Cellular (Voronoi) noise
  • Perlin noise
  • Value noise
  • Value Cubic noise
  • OpenSimplex2-based domain warp
  • Basic Grid Gradient domain warp
  • Multiple fractal options for all of the above
  • Supports floats and/or doubles

Supported Languages

If you want to port FastNoise Lite to a new language create a pull request or discuss it on the discord linked above

Getting Started

Documentation

FastNoise Lite Web Preview App

Link: http://auburn.github.io/FastNoiseLite

A compact testing application is available for testing all features included in FastNoise Lite with a visual representation. This can be used for development purposes, testing noise settings and generating noise textures for export.

Source code can be found in the WebPreviewApp directory.

Simplex FBm

Performance Comparisons

Benchmarked using C++ version with NoiseBenchmarking

  • CPU: Intel 7820X @ 4.9Ghz
  • OS: Win10 x64
  • Compiler: clang-cl 10.0.0 -m64 /O2

Million points of noise generated per second (higher = better)

3D Value Perlin (*Open)Simplex Cellular
FastNoise Lite 64.13 47.93 36.83* 12.49
FastNoise (Legacy) 49.34 37.75 44.74 13.27
FastNoise 2 (AVX2) 494.49 261.10 268.44 52.43
libnoise 27.35 0.65
stb perlin 34.32
2D Value Perlin Simplex Cellular
FastNoise Lite 114.01 92.83 71.30 39.15
FastNoise (Legacy) 102.12 87.99 65.29 36.84
FastNoise 2 (AVX2) 776.33 624.27 466.03 194.30

Credits:

  • OpenSimplex2 for the OpenSimplex2 noise algorithm
  • @KdotJPG for implementing all the OpenSimplex algorithms and the Java port
  • CubicNoise for the Value (Cubic) noise algorithm
  • @Rover656 for creating the preview GUI and porting FastNoise Lite to C and HLSL.
  • @snowfoxsh for creating the JavaScript port.
  • @dotlogix for creating the GLSL port.
  • @ForeverZer0 for creating the Go port.
  • @Keavon for creating the Rust port.

Examples

Ridged Fractal

Cellular

Cellular Fractal

Cellular Value Warped

Value Warped

Extension points exported contracts — how you extend this code

Float (Interface)
Float represents a floating-point number type.
Go/fastnoise.go
DummyFloatExt (Interface)
(no doc) [1 implementers]
Rust/src/lib.rs

Core symbols most depended-on inside this repo

lerp
called by 106
Go/fastnoise.go
ValCoord
called by 92
Java/FastNoiseLite.java
_ValCoordR3
called by 72
JavaScript/FastNoiseLite.js
_fnlValCoord3D
called by 72
C/FastNoiseLite.h
_Lerp
called by 53
JavaScript/FastNoiseLite.js
Lerp
called by 53
Java/FastNoiseLite.java
_fnlLerp
called by 53
C/FastNoiseLite.h
GradCoord
called by 44
Java/FastNoiseLite.java

Shape

Method 328
Function 124
Enum 28
Class 20
TypeAlias 6
FuncType 2
Interface 2
Struct 1

Languages

C++28%
Rust18%
Go15%
TypeScript13%
Java13%
C#13%

Modules by API surface

Rust/src/lib.rs90 symbols
Go/fastnoise.go78 symbols
Cpp/FastNoiseLite.h70 symbols
JavaScript/FastNoiseLite.js68 symbols
C/FastNoiseLite.h67 symbols
Java/FastNoiseLite.java65 symbols
CSharp/FastNoiseLite.cs65 symbols
WebPreviewApp/main.cpp8 symbols

For agents

$ claude mcp add FastNoiseLite \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact