Skip to content

Conversation

slopisgood
Copy link

This PR adds a sun_disc_mult: f32 field to the Atmosphere component to control the visibility of the procedural sun disc.

  • Background: When baking irradiance volumes or sky probes, the current atmosphere shader always draws the sun disc. As a result, the probes capture both the baked sun radiance and the sun disc geometry, leading to over-bright results.
  • Solution: Introduce sun_disc_mult, a multiplier on the direct sun disc radiance. The default value is 1.0, which shows the disc. Setting it to 0.0 hides the disc while still scattering the sun's radiance into the sky.
  • Changes:
    • Added pub sun_disc_mult: f32 to the Atmosphere struct with documentation.
    • Updated the EARTH constant to set sun_disc_mult: 1.0.

This allows applications to disable the sun disc when baking sky lighting. Closes #20425.

Adds a multiplier field to control sun disc visibility in the procedural atmosphere.
… visibility (bevyengine#20425)

Adds a new `sun_disc_mult: f32` field to the Atmosphere component so users can toggle the sun disc in procedural sky rendering. Defaults to 1.0 (sun visible) and can be set to 0.0 to hide the disc. The default EARTH constant is updated to set `sun_disc_mult` to 1.0.

This partially addresses bevyengine#20425.https://github.com/slopisgood/bevy/edit/slopisgood-patch-1/crates/bevy_pbr/src/atmosphere/mod.rs
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Adds sun_disc_mult field to the Atmosphere struct in WGSL so that it matches the Rust component. Allows toggling visibility of the sun disc. (bevyengine#20425)
@NotAFile
Copy link
Contributor

NotAFile commented Aug 12, 2025

These changes don't appear to do anything and seem to be possibly vibecoded?

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Nominated-To-Close A triage team member thinks this PR or issue should be closed out. labels Aug 13, 2025
@alice-i-cecile
Copy link
Member

Closing per bevyengine/bevy-website#2204

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-Usability A targeted quality-of-life change that makes Bevy easier to use S-Nominated-To-Close A triage team member thinks this PR or issue should be closed out.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Expose option to render the procedural atmosphere without the direct solar disc (sun‑disk)
3 participants