Skip to content

Conversation

@mate-h
Copy link
Contributor

@mate-h mate-h commented Jan 4, 2026

Objective

Solution

  • For each directional light with shadows enabled, we sample the shadow map at the fragment’s world position. The shadow factor (0.0 = fully shadowed, 1.0 = fully lit) attenuates the inscattering contribution for the mie scattering component.

Testing

  • Ran the atmospheric_fog example with and without the shadows_enabled flag

Showcase

before

image

after

image

@mate-h mate-h requested a review from atlv24 January 4, 2026 20:41
@mate-h mate-h added M-Deliberate-Rendering-Change An intentional change to how tests and examples are rendered A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 4, 2026
@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label Jan 4, 2026
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

This is much better. I remember running into this in my own project years ago!

@alice-i-cecile alice-i-cecile 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 Jan 4, 2026
@alice-i-cecile alice-i-cecile added this to the 0.18 milestone Jan 4, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 4, 2026
Merged via the queue into bevyengine:main with commit d4b97af Jan 4, 2026
51 checks passed
@github-project-automation github-project-automation bot moved this to Done in Rendering Jan 4, 2026
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-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Deliberate-Rendering-Change An intentional change to how tests and examples are rendered 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: Done

Development

Successfully merging this pull request may close these issues.

Atmospheric fog bleeds sunlight through all objects

3 participants