[PR #3924] [CLOSED] Ray-marched clouds, native water and atmosphere (fog, sun shafts, Nether haze, End nebula) #5292

Closed
opened 2026-11-03 05:11:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3924
Author: @JacobRWebb
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: feat/raymarch-effects


📝 Commits (6)

  • c1f04df Ray-marched clouds: an off-by-default volumetric cloud pass
  • b9f4c12 Ray-marched clouds: keep the step budget from cutting off distant clouds
  • 5f09640 Native water shader work from feat-native-water-shader
  • 968daa4 Ray-marched atmosphere: fog, sun shafts, Nether haze and End nebula
  • a59a266 Ray-marched void sea, portal gas, lava crust and flame volumes
  • a1bc5fb Ray-marched fire and smoke volumes, and a tighter lava crust

📊 Changes

21 files changed (+4216 additions, -17 deletions)

View changed files

📝 crates/horizon-client-render/src/clouds.rs (+13 -1)
📝 crates/horizon-client-render/src/entity.wgsl (+6 -0)
📝 crates/horizon-client-render/src/gfx.rs (+431 -6)
➕ crates/horizon-client-render/src/gfx/atmosphere.rs (+326 -0)
➕ crates/horizon-client-render/src/gfx/atmosphere.wgsl (+471 -0)
➕ crates/horizon-client-render/src/gfx/raymarch_clouds.rs (+484 -0)
➕ crates/horizon-client-render/src/gfx/raymarch_clouds.wgsl (+201 -0)
➕ crates/horizon-client-render/src/gfx/underwater.rs (+233 -0)
➕ crates/horizon-client-render/src/gfx/underwater.wgsl (+154 -0)
➕ crates/horizon-client-render/src/gfx/water.rs (+572 -0)
➕ crates/horizon-client-render/src/gfx/water.wgsl (+409 -0)
📝 crates/horizon-client-render/src/gfx/world_post.rs (+3 -2)
📝 crates/horizon-client-render/src/graphics.rs (+165 -1)
📝 crates/horizon-client-render/src/graphics_ui.rs (+313 -0)
📝 crates/horizon-client-render/src/particles.rs (+13 -0)
📝 crates/horizon-client-render/src/terrain.wgsl (+177 -0)
📝 crates/horizon-client/src/game.rs (+28 -0)
➕ crates/horizon-client/src/game/fires.rs (+70 -0)
📝 crates/horizon-client/src/game/options.rs (+60 -0)
📝 crates/horizon-client/src/game/perspective.rs (+81 -7)

...and 1 more files

📄 Description

What

Three opt-in (off by default) shader features, one PR:

  • Ray-marched clouds: a fullscreen pass marches each pixel's ray through a cloud slab, stopping at terrain depth. Ported from feat-raymarch-clouds-and-water-shaders.
  • Native water: depth colour, waves, reflections, glint, refraction, foam and an underwater pass (gfx/water.rs, gfx/underwater.rs). Ported from that branch's uncommitted work.
  • Ray-marched atmosphere (new): gfx/atmosphere.rs + atmosphere.wgsl, sharing the clouds' 3D noise.
    • Overworld: sun-lit ground fog plus sun shafts marched through the depth buffer, so terrain and leaves cut them.
    • Nether: ash haze glowing off the lava sea, with embers rising near the eye.
    • End: violet mist over the islands, plus nebula gas marched through a shell in the void.

New settings: atmosphere, atmosphereDensity, atmosphereShafts. Docs in docs/graphics.md.

Notes

  • Merge conflicts with main (HDR settings, perspective.rs body-visibility refactor) were resolved by hand; water's player_model_exists now sits under main's own_body_visible.
  • The HLSL translation test now also covers water.wgsl, which is appended to terrain.wgsl.
  • Over-long water setting descriptions were shortened to pass every_advanced_setting_has_a_description.

Testing

cargo test -p horizon-client-render -p horizon-client --lib passes, including naga validation and HLSL translation of every shader. Not yet looked at in a running game: the look and tuning of the atmosphere (fog thickness, embers, nebula) are untested visually.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3924 **Author:** [@JacobRWebb](https://github.com/JacobRWebb) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/raymarch-effects` --- ### 📝 Commits (6) - [`c1f04df`](https://github.com/horizon-rust/horizon/commit/c1f04df695465d2255b8bd9c549bb167101d9c2f) Ray-marched clouds: an off-by-default volumetric cloud pass - [`b9f4c12`](https://github.com/horizon-rust/horizon/commit/b9f4c122bcd464f90ae9e61116dda79743e2d774) Ray-marched clouds: keep the step budget from cutting off distant clouds - [`5f09640`](https://github.com/horizon-rust/horizon/commit/5f096405faaf41cbc5f20293b192bd3d0992a062) Native water shader work from feat-native-water-shader - [`968daa4`](https://github.com/horizon-rust/horizon/commit/968daa421457056f404b191e4ea2a6de0bc47275) Ray-marched atmosphere: fog, sun shafts, Nether haze and End nebula - [`a59a266`](https://github.com/horizon-rust/horizon/commit/a59a2660c21736ed7b4f479bc2b56c0131df29dd) Ray-marched void sea, portal gas, lava crust and flame volumes - [`a1bc5fb`](https://github.com/horizon-rust/horizon/commit/a1bc5fb4a40eab2501ead0095d6332a53fefe522) Ray-marched fire and smoke volumes, and a tighter lava crust ### 📊 Changes **21 files changed** (+4216 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/clouds.rs` (+13 -1) 📝 `crates/horizon-client-render/src/entity.wgsl` (+6 -0) 📝 `crates/horizon-client-render/src/gfx.rs` (+431 -6) ➕ `crates/horizon-client-render/src/gfx/atmosphere.rs` (+326 -0) ➕ `crates/horizon-client-render/src/gfx/atmosphere.wgsl` (+471 -0) ➕ `crates/horizon-client-render/src/gfx/raymarch_clouds.rs` (+484 -0) ➕ `crates/horizon-client-render/src/gfx/raymarch_clouds.wgsl` (+201 -0) ➕ `crates/horizon-client-render/src/gfx/underwater.rs` (+233 -0) ➕ `crates/horizon-client-render/src/gfx/underwater.wgsl` (+154 -0) ➕ `crates/horizon-client-render/src/gfx/water.rs` (+572 -0) ➕ `crates/horizon-client-render/src/gfx/water.wgsl` (+409 -0) 📝 `crates/horizon-client-render/src/gfx/world_post.rs` (+3 -2) 📝 `crates/horizon-client-render/src/graphics.rs` (+165 -1) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+313 -0) 📝 `crates/horizon-client-render/src/particles.rs` (+13 -0) 📝 `crates/horizon-client-render/src/terrain.wgsl` (+177 -0) 📝 `crates/horizon-client/src/game.rs` (+28 -0) ➕ `crates/horizon-client/src/game/fires.rs` (+70 -0) 📝 `crates/horizon-client/src/game/options.rs` (+60 -0) 📝 `crates/horizon-client/src/game/perspective.rs` (+81 -7) _...and 1 more files_ </details> ### 📄 Description ## What Three opt-in (off by default) shader features, one PR: - **Ray-marched clouds**: a fullscreen pass marches each pixel's ray through a cloud slab, stopping at terrain depth. Ported from `feat-raymarch-clouds-and-water-shaders`. - **Native water**: depth colour, waves, reflections, glint, refraction, foam and an underwater pass (`gfx/water.rs`, `gfx/underwater.rs`). Ported from that branch's uncommitted work. - **Ray-marched atmosphere (new)**: `gfx/atmosphere.rs` + `atmosphere.wgsl`, sharing the clouds' 3D noise. - Overworld: sun-lit ground fog plus sun shafts marched through the depth buffer, so terrain and leaves cut them. - Nether: ash haze glowing off the lava sea, with embers rising near the eye. - End: violet mist over the islands, plus nebula gas marched through a shell in the void. New settings: `atmosphere`, `atmosphereDensity`, `atmosphereShafts`. Docs in `docs/graphics.md`. ## Notes - Merge conflicts with main (HDR settings, `perspective.rs` body-visibility refactor) were resolved by hand; water's `player_model_exists` now sits under main's `own_body_visible`. - The HLSL translation test now also covers `water.wgsl`, which is appended to `terrain.wgsl`. - Over-long water setting descriptions were shortened to pass `every_advanced_setting_has_a_description`. ## Testing `cargo test -p horizon-client-render -p horizon-client --lib` passes, including naga validation and HLSL translation of every shader. **Not yet looked at in a running game**: the look and tuning of the atmosphere (fog thickness, embers, nebula) are untested visually. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5292
No description provided.