Skip to content

Commit a44ad73

Browse files
alice-i-cecileecoskey
authored andcommitted
Add release notes for new Sun Disk feature (#21153)
# Objective - #20434 is really cool, and deserves a bit of a showcase. - Fixes #21125. ## Solution - Write release notes. - Also add a note to the docs that this plays nicely with bloom. --------- Co-authored-by: Emerson Coskey <emerson@coskey.dev>
1 parent 7e89a01 commit a44ad73

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

crates/bevy_light/src/directional_light.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ pub fn update_directional_light_frusta(
248248
/// By default, the atmosphere is rendered with [`SunDisk::EARTH`], which approximates the
249249
/// apparent size and brightness of the Sun as seen from Earth. You can also disable the sun
250250
/// disk entirely with [`SunDisk::OFF`].
251+
///
252+
/// In order to cause the sun to "glow" and light up the surrounding sky, enable bloom
253+
/// in your post-processing pipeline by adding a `Bloom` component to your camera.
251254
#[derive(Component, Clone)]
252255
#[require(DirectionalLight)]
253256
pub struct SunDisk {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Procedural Sun Disk
3+
authors: ["@defuz"]
4+
pull_requests: [20434]
5+
---
6+
7+
TODO: grab images from 20434 PR description.
8+
9+
Any good [procedural atmosphere] deserves a procedural sun to light it.
10+
To enable this, add the [`SunDisk`] component to your [`DirectionalLight`] entity.
11+
The sun will move with your light, playing nicely with any positioning or movement logic you've implemented.
12+
13+
You can set both the `angular_size` and `intensity` of the sun disk, changing the size and brightness of the sun.
14+
We've included a convenient `SunDisk::EARTH` constant, to spare you the tricky experimental trigonometry.
15+
16+
If you've ever stared directly at the sun in real life (not recommended), you'll also be familiar with a spreading glow
17+
that bleeds out into the nearby sky.
18+
This is an effect known as "bloom", which is enabled by adding the [`Bloom`] component to your camera entity.
19+
20+
[procedural atmosphere]: https://bevy.org/news/bevy-0-16/#procedural-atmospheric-scattering
21+
[`SunDisk`]: https://docs.rs/bevy/0.17.0-rc.1/bevy/light/struct.SunDisk.html
22+
[`Bloom`]: https://docs.rs/bevy/0.17.0-rc.1/bevy/post_process/bloom/struct.Bloom.html

0 commit comments

Comments
 (0)