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:
```rust use bevy::prelude::*; use noisybevy::simplexnoise_2d;
let p = Vec2::new(12.3, 45.6); let value = simplexnoise2d(p); ```
First add the plugin to the Bevy app:
rust ignore
App::new()
.add_plugin(NoisyShaderPlugin)
And import it and use it in your shaders, with the same API as on the CPU-side:
```wgsl
// ...
let p = vec2(12.3, 45.6); let value = simplexnoise2d(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.8| 0.1, main|
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!