diff --git a/crates/bevy_light/src/directional_light.rs b/crates/bevy_light/src/directional_light.rs index b7e97a3a78536..765d80d17f0b4 100644 --- a/crates/bevy_light/src/directional_light.rs +++ b/crates/bevy_light/src/directional_light.rs @@ -248,6 +248,9 @@ pub fn update_directional_light_frusta( /// By default, the atmosphere is rendered with [`SunDisk::EARTH`], which approximates the /// apparent size and brightness of the Sun as seen from Earth. You can also disable the sun /// disk entirely with [`SunDisk::OFF`]. +/// +/// In order to cause the sun to "glow" and light up the surrounding sky, enable bloom +/// in your post-processing pipeline by adding a `Bloom` component to your camera. #[derive(Component, Clone)] #[require(DirectionalLight)] pub struct SunDisk { diff --git a/release-content/release-notes/sun_disk.md b/release-content/release-notes/sun_disk.md new file mode 100644 index 0000000000000..468aa27aa9869 --- /dev/null +++ b/release-content/release-notes/sun_disk.md @@ -0,0 +1,22 @@ +--- +title: Procedural Sun Disk +authors: ["@defuz"] +pull_requests: [20434] +--- + +TODO: grab images from 20434 PR description. + +Any good [procedural atmosphere] deserves a procedural sun to light it. +To enable this, add the [`SunDisk`] component to your [`DirectionalLight`] entity. +The sun will move with your light, playing nicely with any positioning or movement logic you've implemented. + +You can set both the `angular_size` and `intensity` of the sun disk, changing the size and brightness of the sun. +We've included a convenient `SunDisk::EARTH` constant, to spare you the tricky experimental trigonometry. + +If you've ever stared directly at the sun in real life (not recommended), you'll also be familiar with a spreading glow +that bleeds out into the nearby sky. +This is an effect known as "bloom", which is enabled by adding the [`Bloom`] component to your camera entity. + +[procedural atmosphere]: https://bevy.org/news/bevy-0-16/#procedural-atmospheric-scattering +[`SunDisk`]: https://docs.rs/bevy/0.17.0-rc.1/bevy/light/struct.SunDisk.html +[`Bloom`]: https://docs.rs/bevy/0.17.0-rc.1/bevy/post_process/bloom/struct.Bloom.html