Skip to content

Conversation

@mate-h
Copy link
Contributor

@mate-h mate-h commented Aug 26, 2025

Objective

Solution

  • Added spherical coordinate system alongside the sky-view lut parameterization
  • Added ray-marched rendering method to support space views and accurate lighting
  • This is setting the stage for PBR integration, volumetric shadows
  • Could maybe re-use the ray-marching function in the aerial view LUT as well, but I didn't bother for this PR (future improvement)

Testing

  • Ran the atmosphere example to ensure it still works fine with both rendering methods
  • Created a freecam version of the atmosphere example and put the camera in space, below ground.

Showcase

Screen.Recording.2025-09-02.at.12.28.35.AM.mov

@mate-h mate-h requested review from atlv24 and ecoskey August 26, 2025 17:01
@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen M-Release-Note Work that should be called out in the blog due to impact S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 26, 2025
@github-actions
Copy link
Contributor

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

@mate-h mate-h added M-Release-Note Work that should be called out in the blog due to impact S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed M-Release-Note Work that should be called out in the blog due to impact S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 26, 2025
@github-actions
Copy link
Contributor

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

@JMS55
Copy link
Contributor

JMS55 commented Aug 26, 2025

Fix bug where sky turns black below y = 0

Which part fixes that?

Also this is #19131

@mate-h mate-h added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 27, 2025
@mate-h mate-h removed the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Aug 31, 2025
Co-authored-by: atlv <[email protected]>
@mate-h
Copy link
Contributor Author

mate-h commented Sep 2, 2025

Thanks for the comments! I think everything has been addressed, including what to do for when the camera is inside of the earth. I update the atmosphere example here for testing but decided not to include it in this PR to avoid more scope. I would say at this stage it's ready for a final review. I updated the PR description with a new demo video.
https://github.com/mate-h/bevy/pull/13/files

@mate-h mate-h 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 Sep 2, 2025
Copy link
Contributor

@atlv24 atlv24 left a comment

Choose a reason for hiding this comment

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

Fully happy with these changes now. Thanks for being patient :)

One last thing i'd consider is if view_pos never gets used directly (always immediately fed to length+normalize to get r and up) then maybe having get_view_position return a struct that has an up and radius field would make sense. Happy with it as is though, thanks for all the work!

@mate-h
Copy link
Contributor Author

mate-h commented Sep 3, 2025

@alice-i-cecile this one is ready for a final review and merge!
Also note that once this is merged, the PR #20838 by @ecoskey will have to be rebased.

@mate-h mate-h removed the request for review from ecoskey September 3, 2025 18:13
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.

I'm happy with this too :) Quite clear, and a feature that a lot of our devs will love.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 3, 2025
Merged via the queue into bevyengine:main with commit df74f98 Sep 3, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this to Done in Rendering Sep 3, 2025
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-Feature A new feature, making something new possible M-Release-Note Work that should be called out in the blog due to impact 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.

4 participants