Skip to content

Neopallium/bevy_atmosphere

 
 

Repository files navigation

bevy_atmosphere logo

bevy Crates.io Crates.io docs.rs MIT/Apache 2.0 Discord

A procedural sky plugin for the Bevy game engine.

basic example image

use bevy::prelude::*;
use bevy_atmosphere::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(AtmospherePlugin)
        .add_startup_system(setup)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn((Camera3dBundle::default(), AtmosphereCamera::default()));
}

cycle example image

Getting Started

To learn more, read the docs or check out the examples.

For more information on the technicalities, you can check out the technical docs or check out my blog.

🚧 Warning: Under Development 🚧

Versions 0.4 and higher break compatibility with WebGL by using a compute shader for efficiency. WebGPU should resolve this when shipped.

If you need to test a web build, you can try enabling your browser's respective experiment flag for WebGPU.

License

bevy_atmosphere is dual-licensed under MIT and Apache-2.0! That means you can choose to use bevy_atmosphere under either for your project.

0.5 Change Log

  • Removed the Atmosphere resource in favor of the Nishita model.
  • Added the AtmosphereModel resource, which holds an Atmospheric model.
  • Added the Atmospheric trait and derive macro, which is used to define a model for the pipeline to render.
  • Added the Nishita model, which provides Rayleigh and Mie scattering.
  • Added the Gradient model, which provides a simple linear gradient of three colors.
  • Added the Atmosphere and AtmosphereMut system params, for working with a specific model.
  • Added AtmosphereSettings.dithering, which allows for enabling/disabling dithering at runtime.
  • Updated bevy_atmosphere::prelude to include new common types.
  • Added AtmosphereModelMetadata, which is used to store type data about a model.
  • Added AddAtmosphereModel, which is used to easily register new models from an App.
  • Added RegisterAtmosphereModel, which is used to register the model it's implemented for.
  • Added AtmosphereImageBindGroupLayout, which is used to store a common bind group layout for all models.
  • Added SkyBoxMaterialKey, which is used to pass the dithering state to the pipeline.

About

A procedural sky plugin for bevy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%