bevy_compute_noise
A plugin for bevy 0.15
for generating tilable 2D/3D noise textures using compute shaders.
Check out a demo of the plugin here: https://jadedbay.com/demo/bevy_compute_noise (Chrome only)
Usage
Add the bevy_compute_noise
dependency to Cargo.toml
:
[]
= "0.3.0"
Add Noise Plugin
use *;
default
.add_plugins
.add_plugins // add new plugin for each type of noise needed
.run;
Queue Noise Generation
Alternatively, you can add ComputeNoiseComponent<T: ComputeNoise>
to an entity and it will be automatically queued whenever it has been updated:
Noise Types
- Worley2D
- Worley3D
- Perlin2D
TODO
- Add more noise types.
- Allow combination of noise.
- Allow writing into specific texture channels.
Version Compatibility
bevy_compute_noise |
Bevy |
---|---|
0.3 |
0.15 |
0.2 |
0.14 |
0.1 |
0.13 |
Readback
If you need to readback the noise texture to the CPU, you can clone the readback branch and view the example in there. I'm not completely happy with the implementation and it's better to just generate the noise on the CPU using another crate anyway.