[GH-ISSUE #3025] Water not properly connecting between real and LOD chunks #785

Open
opened 2026-11-02 15:41:54 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3025

Version: not given · OS: MacOS 15.7.3 Apple M4 Max (copied from the report)

What I did: Play the game
What happened: The water doesnt nicely connect between LOD and real chunks
What I expected: The water to nicely connect between LOD and real chunks
Horizon version: latest
OS, CPU, GPU: MacOS 15.7.3 Apple M4 Max

Reported on Discord by Hex in #horizon-bugs · Discord thread
Tags: rendering

Attachments (Discord links expire after a while; the thread keeps them)

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3025 **Version:** not given · **OS:** MacOS 15.7.3 Apple M4 Max <sub>(copied from the report)</sub> > What I did: Play the game > What happened: The water doesnt nicely connect between LOD and real chunks > What I expected: The water to nicely connect between LOD and real chunks > Horizon version: latest > OS, CPU, GPU: MacOS 15.7.3 Apple M4 Max Reported on Discord by **Hex** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1564801778111877130) Tags: rendering **Attachments** (Discord links expire after a while; the thread keeps them) - [image.png](https://cdn.discordapp.com/attachments/1564801778111877130/1564801779563237406/image.png?ex=6ae296b8&is=6ae14538&hm=b925067628d51299b9315553fe9c3913753343b3895545343f6e75e330442c3d&) <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
Author
Owner

@ludovic111 commented on GitHub (Oct 28, 2026):

Hex added on Discord:

No yeah but its more complicated than that bcs I was getting artifacts not just at the LOD boundary

<!-- gh-comment-id:6457758016 --> @ludovic111 commented on GitHub (Oct 28, 2026): **Hex** added on Discord: > No yeah but its more complicated than that bcs I was getting artifacts not just at the LOD boundary <!-- kira -->
Author
Owner

@d3grando commented on GitHub (Oct 28, 2026):

🤖 Agent: I reproduced this on macOS, and the hard edge seems to come from the far terrain's "seal". Below is what I measured and the experiment that removes it. This comes from d3grando's AI agent (Claude Code), not from d3grando themselves.

Setup:

  • MacBook Pro, Apple M5 Pro, macOS 26.6.2, Metal.
  • Builds: v0.2.97 (release) and main at 142388e1.
  • Seed 1, Render Distance 8, LOD Distance 128, offscreen 1280x720 (2560x1440).
  • I stood on a barrier at (300, 140, 40) and looked over the ocean (yaw 135, pitch 25).

What it looks like. Where full-detail chunks end, there's a sharp, chunk-stepped line in the water. It's the same on 0.2.97 and main. Zoomed in, it isn't only a colour change. A translucent water "curtain" stands at the edge of the full-detail area, running from the far terrain's water surface down to the sea floor and facing the camera. Seen through the near water, it makes a darker band.

Average colour of the water (sRGB, same frame):

full-detail water (near) far water just past the edge
v0.2.97 (57, 87, 133) (73, 105, 147)
main 142388e1 (57, 87, 133) (72, 106, 147)

Where the curtain comes from. lod/mesh.rs (mesh_columns_with_edges, from fde95ff2) adds a side face on every far column that borders a covered (full-detail) column:

// Near meshes may have culled against the real neighbor.
// Keep a finite seal where their full-detail area begins.
if is_covered(nw[0], nw[1]) {
    add_side(&mut faces, direction, plane, u0, u1, segment, &[], side, own_sky);

For solid terrain, the seal hides a gap. For a water column, the seal is a translucent water face from the surface to the sea floor. Vanilla never draws a face between two water blocks: LiquidBlockRenderer.shouldRenderFace skips a side whose neighbour is the same fluid. The full-detail mesh did cull its outer water sides against the real neighbouring water, so the only thing left at the edge is this one wall.

Experiment (a local branch, not a PR): skip the seal when the segment is water (segment.material.fluid == 1).

  • In the same views, the curtain and the dark band are gone, and the full-detail and far water meet with no visible line.
  • What's left is that the far sea floor reads a bit brighter than the full-detail one, a few darker seal squares on the sea floor. That's much less visible.

The experiment is too blunt to ship. A far water column next to full-detail land or air (a lake or river crossing the edge) would lose a side face it should keep. The mesher passes &[] for covered neighbours, so it doesn't know what's on the full-detail side. A real fix probably needs to know whether the covered neighbour is water at that height, for example from the column summary the far tile already has for that chunk, or the near edge. Then it can hide the water part of the seal the way hides() does between two far columns. That's in the far-terrain code, which is being reworked (#3368), so I'm leaving the approach to whoever owns it.

I see nothing macOS-specific here: the seal is CPU-side mesh data. The report's "artifacts not just at the LOD boundary" may be the far sea floor's brighter look. I didn't see other artifacts in these views.

Screenshots: main (top) and the no-water-seal experiment (bottom), same view, two directions:

compare a
compare b

Zoom of the curtain on main, then the same spot with the experiment:

zoom main
zoom experiment

<!-- gh-comment-id:6483385766 --> @d3grando commented on GitHub (Oct 28, 2026): 🤖 Agent: I reproduced this on macOS, and the hard edge seems to come from the far terrain's "seal". Below is what I measured and the experiment that removes it. This comes from d3grando's AI agent (Claude Code), not from d3grando themselves. **Setup:** - MacBook Pro, Apple M5 Pro, macOS 26.6.2, Metal. - Builds: v0.2.97 (release) and `main` at 142388e1. - Seed 1, Render Distance 8, LOD Distance 128, offscreen 1280x720 (2560x1440). - I stood on a barrier at (300, 140, 40) and looked over the ocean (yaw 135, pitch 25). **What it looks like.** Where full-detail chunks end, there's a sharp, chunk-stepped line in the water. It's the same on 0.2.97 and `main`. Zoomed in, it isn't only a colour change. A translucent water "curtain" stands at the edge of the full-detail area, running from the far terrain's water surface down to the sea floor and facing the camera. Seen through the near water, it makes a darker band. Average colour of the water (sRGB, same frame): | | full-detail water (near) | far water just past the edge | |---|---|---| | v0.2.97 | (57, 87, 133) | (73, 105, 147) | | main 142388e1 | (57, 87, 133) | (72, 106, 147) | **Where the curtain comes from.** `lod/mesh.rs` (`mesh_columns_with_edges`, from fde95ff2) adds a side face on every far column that borders a covered (full-detail) column: ```rust // Near meshes may have culled against the real neighbor. // Keep a finite seal where their full-detail area begins. if is_covered(nw[0], nw[1]) { add_side(&mut faces, direction, plane, u0, u1, segment, &[], side, own_sky); ``` For solid terrain, the seal hides a gap. For a water column, the seal is a translucent water face from the surface to the sea floor. Vanilla never draws a face between two water blocks: `LiquidBlockRenderer.shouldRenderFace` skips a side whose neighbour is the same fluid. The full-detail mesh did cull its outer water sides against the real neighbouring water, so the only thing left at the edge is this one wall. **Experiment** (a local branch, not a PR): skip the seal when the segment is water (`segment.material.fluid == 1`). - In the same views, the curtain and the dark band are gone, and the full-detail and far water meet with no visible line. - What's left is that the far sea floor reads a bit brighter than the full-detail one, a few darker seal squares on the sea floor. That's much less visible. The experiment is too blunt to ship. A far water column next to full-detail *land* or air (a lake or river crossing the edge) would lose a side face it should keep. The mesher passes `&[]` for covered neighbours, so it doesn't know what's on the full-detail side. A real fix probably needs to know whether the covered neighbour is water at that height, for example from the column summary the far tile already has for that chunk, or the near edge. Then it can hide the water part of the seal the way `hides()` does between two far columns. That's in the far-terrain code, which is being reworked (#3368), so I'm leaving the approach to whoever owns it. I see nothing macOS-specific here: the seal is CPU-side mesh data. The report's "artifacts not just at the LOD boundary" may be the far sea floor's brighter look. I didn't see other artifacts in these views. Screenshots: main (top) and the no-water-seal experiment (bottom), same view, two directions: ![compare a](https://raw.githubusercontent.com/d3grando/horizon/pr-assets/issue-3025-compare-a.png) ![compare b](https://raw.githubusercontent.com/d3grando/horizon/pr-assets/issue-3025-compare-b.png) Zoom of the curtain on main, then the same spot with the experiment: ![zoom main](https://raw.githubusercontent.com/d3grando/horizon/pr-assets/issue-3025-zoom-main.png) ![zoom experiment](https://raw.githubusercontent.com/d3grando/horizon/pr-assets/issue-3025-zoom-exp.png)
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#785
No description provided.