9 breaking releases

Uses new Rust 2024

new 0.10.0 May 4, 2025
0.8.0 Dec 6, 2024
0.7.0 Jul 10, 2024
0.6.0 Feb 23, 2024
0.2.0 Nov 15, 2022

#237 in Game dev

Download history 154/week @ 2025-01-12 166/week @ 2025-01-19 106/week @ 2025-01-26 230/week @ 2025-02-02 243/week @ 2025-02-09 208/week @ 2025-02-16 308/week @ 2025-02-23 212/week @ 2025-03-02 248/week @ 2025-03-09 190/week @ 2025-03-16 189/week @ 2025-03-23 123/week @ 2025-03-30 160/week @ 2025-04-06 234/week @ 2025-04-13 318/week @ 2025-04-20 342/week @ 2025-04-27

1,074 downloads per month
Used in 2 crates

MIT license

320KB
458 lines

noisy_bevy

crates.io MIT docs.rs

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

screenshot of an asteroid generated on the gpu and cpu

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.16 0.9, 0.10, main
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

Contributions

PRs welcome!

Dependencies

~40–71MB
~1M SLoC