Crates.io | noisy_bevy |
lib.rs | noisy_bevy |
version | |
source | src |
created_at | 2022-10-25 18:36:18.775797 |
updated_at | 2024-12-06 08:43:31.066095 |
description | Procedural noise primitives for Bevy |
homepage | |
repository | https://github.com/johanhelsing/noisy_bevy |
max_upload_size | |
id | 697126 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Simple stupid noise primitives for glam types (Vec2
, Vec3
) and wgsl.
Main motivations are:
simplex_noise_2d
]simplex_noise_2d_seeded
]simplex_noise_3d
]fbm_simplex_2d
]fbm_simplex_2d_seeded
]fbm_simplex_3d
]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);
First add the plugin to the Bevy app:
App::new()
.add_plugins(NoisyShaderPlugin)
And import it and use it in your shaders, with the same API as on the CPU-side:
#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.
The main
branch targets the latest bevy release.
bevy | noisy_bevy |
---|---|
0.15 | 0.8, main |
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 |
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.
The noise primitives are ports/copies of these
PRs welcome!