| Crates.io | bevy_sky_gradient |
| lib.rs | bevy_sky_gradient |
| version | 0.2.0 |
| created_at | 2025-12-19 18:23:42.934967+00 |
| updated_at | 2025-12-19 20:06:58.779116+00 |
| description | Sky rendering plugin for bevy featuring, sky gradient, aurora / northern lights, stars, sun, day-night cycle |
| homepage | |
| repository | https://github.com/TanTanDev/bevy_sky_gradient |
| max_upload_size | |
| id | 1995248 |
| size | 405,486 |
A simple and beautiful procedural sky shader for the Bevy game engine.

Add the bevy_sky_gradient crate to your Cargo.toml:
[dependencies]
bevy_sky_gradient = "0.2.0"
Then, add the SkyPlugin to your app and add the SkyboxMagnetTag to your camera.
use bevy::prelude::*;
use bevy_sky_gradient::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
// Add the SkyPlugin with all features enabled
.add_plugins(SkyPlugin::default())
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
// Spawn a camera
commands.spawn((
Camera3dBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
},
// Add this tag to make the skybox follow the camera
SkyboxMagnetTag,
));
}
bevy_sky_gradient is designed to be modular. You can easily enable, disable, or configure features using the SkyPlugin::builder().
SkyPlugin::builder()
.set_sun_driver(SunDriverPlugin{
sun_settings: SunSettings{ sun_color: vec4(1.0,1.0,0.0,1.0), ..default()}
..default()
})
.set_aurora(AuroraPlugin {
aurora_settings: AuroraSettings {
render_texture_percent: 0.25, // Render at 25% resolution
..default()
},
.set_cycle(SkyCyclePlugin::default())
.set_gradient_driver(GradientDriverPlugin::default())
.set_ambient_driver(AmbientDriverPlugin:::default())
}).build(),
Sky Cycle (SkyCyclePlugin): This plugin introduces a timer that drives the day-night cycle. It controls the position of the sun and the color of the sky gradient. You can customize the length of the day, night, sunrise, and sunset via the SkyTimeSettings resource.
Sun Driver (SunDriverPlugin): This plugin spawns a DirectionalLight entity and updates its position and intensity based on the time of day from the SkyCyclePlugin. It also updates the sun's appearance in the skybox shader.
Aurora (AuroraPlugin): This plugin adds a beautiful procedural aurora effect to the night sky. The aurora is rendered to a separate texture for better performance and is then blended with the main skybox. You can adjust the render quality of the aurora via the AuroraSettings resource.
Rendering to a Texture: For advanced use cases like screen-space fog or reflections, you can have the skybox render to a texture instead of directly to the screen. Use the .with_render_sky_to_texture() method on the SkyPluginBuilder.
| bevy | Bevy Sky Gradient |
|---|---|
| 0.17 | 0.2.0 |
| 0.16 | 0.1.0 |
This project is licensed under either of
at your option.