Expand description
§noisy_bevy
Simple stupid noise primitives for glam (Vec2, Vec3) and WGSL.
- Integrates with Bevy seamlessly
- Same results on the CPU and GPU (not bit-level perfect, though)
§Features
simplex_noise_2dsimplex_noise_2d_seededsimplex_noise_3dsimplex_noise_3d_seededfbm_simplex_2dfbm_simplex_2d_seededfbm_simplex_3dfbm_simplex_3d_seededworley_2d

§Usage
§From Rust
Zero initialization, just call the noise functions:
use bevy::prelude::*;
use noisy_bevy::simplex_noise_2d;
let p = Vec2::new(12.3, 45.6);
let value = simplex_noise_2d(p);§From WGSL shaders
First add the plugin to the Bevy app:
ⓘ
App::new()
.add_plugins(NoisyShaderPlugin)Then use it in your shaders:
#import noisy_bevy::simplex_noise_2d
// ...
let p = vec2(12.3, 45.6);
let value = simplex_noise_2d(p);See the asteroids example, for an example that uses noise to procedurally generate a tilemap on the CPU and a matching background in a wgsl shader.
§Bevy Version Support
The main branch targets the latest bevy release.
| bevy | noisy_bevy |
|---|---|
| 0.17 | 0.11, main |
| 0.16 | 0.9, 0.10 |
| 0.15 | 0.8 |
| 0.14 | 0.7 |
| 0.13 | 0.6 |
| 0.12 | 0.5 |
| 0.11 | 0.4 |
| 0.10 | 0.3 |
| 0.9 | 0.2 |
| 0.8 | 0.1 |
§License
MIT
The original simplex noise source is MIT-only, however all changes made by me or PRs to this repo are also available under Apache-2.0.
§Acknowledgments
The noise primitives are ports/copies of these
- https://github.com/stegu/psrdnoise
- https://gist.github.com/munrocket/236ed5ba7e409b8bdf1ff6eca5dcdc39
- https://github.com/bevy-interstellar/wgsl_noise
§Contributions
PRs welcome!
Structs§
- Noisy
Shader Plugin - Adds noise library as a wgsl import
Functions§
- fbm_
simplex_ 2d - Fractional brownian motion (fbm) based on 2d simplex noise
- fbm_
simplex_ 2d_ seeded - Fractional brownian motion (fbm) based on seeded 2d simplex noise
- fbm_
simplex_ 3d - Fractional brownian motion (fbm) based on 3d simplex noise
- fbm_
simplex_ 3d_ seeded - Fractional brownian motion (fbm) based on seeded 3d simplex noise
- simplex_
noise_ 2d - Simplex noise in two dimensions
- simplex_
noise_ 2d_ seeded - Simplex noise in two dimensions
- simplex_
noise_ 3d - Simplex noise in three dimensions
- simplex_
noise_ 3d_ seeded - Simplex noise in three dimensions
- worley_
2d - Cellular noise