Skip to content

light: add SunDisk::MARS preset for Mars atmosphere#24618

Open
da-x wants to merge 2 commits into
bevyengine:mainfrom
da-x:mars-sun-disk
Open

light: add SunDisk::MARS preset for Mars atmosphere#24618
da-x wants to merge 2 commits into
bevyengine:mainfrom
da-x:mars-sun-disk

Conversation

@da-x

@da-x da-x commented Jun 13, 2026

Copy link
Copy Markdown

In the atmosphere example we can change between Earth and Mars, but the size of the sun does not change. This somewhat bothered me from an astronomical accuarcy.

This commit introduces a new SunDisk::MARS constant to accurately represent the sun’s apparent size when viewed from Mars. The implementation updates the documentation and adds the corresponding constant with an angular size of ~21 arcminutes (0.00615 radians).

Key modifications:

  • Added SunDisk::MARS constant in directional_light.rs
  • Updated documentation to reference the new Mars preset
  • Modified atmosphere example to switch sun disk alongside atmosphere presets

I tested this manually.

This commit introduces a new `SunDisk::MARS` constant to accurately represent
the sun’s apparent size when viewed from Mars. The implementation updates the
documentation and adds the corresponding constant with an angular size of ~21
arcminutes (0.00615 radians).

Key modifications:

- Added `SunDisk::MARS` constant in `directional_light.rs`
- Updated documentation to reference the new Mars preset
- Modified `atmosphere` example to switch sun disk alongside atmosphere presets
@github-actions

Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 13, 2026
@alice-i-cecile alice-i-cecile requested a review from mate-h June 13, 2026 17:55
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Jun 13, 2026

@mate-h mate-h left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks for this improvement, just a small nit :)

Comment thread crates/bevy_light/src/directional_light.rs Outdated
@kfc35 kfc35 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 14, 2026
Co-authored-by: Máté Homolya <mate.homolya@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

4 participants