[GH-ISSUE #2209] Black horizon expands into the sky at lower render distances #618

Closed
opened 2026-11-02 15:40:33 +07:00 by bsakaguchi · 4 comments
Owner

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

What I did:

Created or entered a flat world.

Observed the horizon where the sky and ground meet.

Decreased the render distance and observed the horizon.

Increased the render distance and observed the horizon again.

What happened:
The horizon appears black where the sky and ground meet. Decreasing the render distance makes the black area more intense and causes it to extend farther upward into the sky. Increasing the render distance reduces the intensity and coverage of the black area.

What I expected:
The horizon should render normally as blue like the other colour of sky, without a black area spreading into the sky when the render distance is decreased.

Horizon version: 0.2.69

OS, CPU, GPU: Windows 11, AMD Ryzen 5 3500U, AMD Radeon(TM) Vega 8 Graphics

Reported on Discord by nynsai.mp3 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 26, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2209 > What I did: > > Created or entered a flat world. > > Observed the horizon where the sky and ground meet. > > Decreased the render distance and observed the horizon. > > Increased the render distance and observed the horizon again. > > What happened: > The horizon appears black where the sky and ground meet. Decreasing the render distance makes the black area more intense and causes it to extend farther upward into the sky. Increasing the render distance reduces the intensity and coverage of the black area. > > What I expected: > The horizon should render normally as blue like the other colour of sky, without a black area spreading into the sky when the render distance is decreased. > > Horizon version: 0.2.69 > > OS, CPU, GPU: Windows 11, AMD Ryzen 5 3500U, AMD Radeon(TM) Vega 8 Graphics Reported on Discord by **nynsai.mp3** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1564277236679573554) Tags: rendering **Attachments** (Discord links expire after a while; the thread keeps them) - [2026-10-26_19-25-22.mp4](https://cdn.discordapp.com/attachments/1564277236679573554/1564277238000652440/2026-10-26_19-25-22.mp4?ex=6ae0ae34&is=6adf5cb4&hm=50fe9ea423c13426fc46395bebcfc80d3d4a6defa57c4c72a7212267005c27b1&) <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:40:33 +07:00
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbt's AI agent (OpenCode, agentrouter/gpt-6.1-sol high) is taking this issue in an isolated worktree. Open-PR searches found no covering fix. The pinned 26.3 client uses the level minimum Y as a flat world's horizon, while Horizon currently uses 63 and passes flat=false to fog. I'll verify the reported rendering and make the smallest complete repair with the required quick self-check.

<!-- gh-comment-id:6418486217 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbt's AI agent (OpenCode, agentrouter/gpt-6.1-sol high) is taking this issue in an isolated worktree. Open-PR searches found no covering fix. The pinned 26.3 client uses the level minimum Y as a flat world's horizon, while Horizon currently uses 63 and passes flat=false to fog. I'll verify the reported rendering and make the smallest complete repair with the required quick self-check.
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbt's AI agent is stopping this implementation because the covering PR #2262 appeared while work was underway; no duplicate PR will be opened. The local fix passed pr_ready.py --quick (310 Python tests, 1,313 client tests), a 48-case pinned-client horizon/void-onset harness, and fresh-home visual checks on both single-player paths. One pinned-26.3 detail to preserve: ServerLevel.isFlat() delegates to WorldData.isFlatWorld() in every dimension, and ServerPlayer.createCommonSpawnInfo uses that flag directly.

<!-- gh-comment-id:6419192972 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbt's AI agent is stopping this implementation because the covering PR #2262 appeared while work was underway; no duplicate PR will be opened. The local fix passed pr_ready.py --quick (310 Python tests, 1,313 client tests), a 48-case pinned-client horizon/void-onset harness, and fresh-home visual checks on both single-player paths. One pinned-26.3 detail to preserve: ServerLevel.isFlat() delegates to WorldData.isFlatWorld() in every dimension, and ServerPlayer.createCommonSpawnInfo uses that flag directly.
Author
Owner

@kacpherek commented on GitHub (Oct 26, 2026):

Thanks nynsai.mp3 for the report! A fix is up in #2262: flat worlds no longer get the black horizon at any render distance. It's waiting for review.

<!-- gh-comment-id:6422833951 --> @kacpherek commented on GitHub (Oct 26, 2026): Thanks nynsai.mp3 for the report! A fix is up in #2262: flat worlds no longer get the black horizon at any render distance. It's waiting for review.
Author
Owner

@levzzz5154 commented on GitHub (Oct 27, 2026):

🤖 Agent: this one is covered by #2262 ("Flat worlds: no black horizon, the dark disc and void fog use the flat horizon", kacpherek), which is open and waiting for review. I checked the current main against the pinned 26.3 client and the fix in that pull request is the right one, so I am not opening a competing pull request. Here is the evidence.

What is wrong on main. The report is a flat world ("Created or entered a flat world"), and the black band is the sky's dark disc and the void fog drawn at the wrong height. In crates/horizon-client/src/game/render_tick.rs the fog and the sky are given:

// level.getMinY(): the Nether and the End start at y 0.
min_y: if self.dim == Dim::Overworld { MIN_Y } else { 0 },
flat: false,

so a superflat world (whose ground is at the level's minimum y) still gets the normal world's horizon at y 63 and is treated as a non-flat level. The dark disc and the void fog are then drawn at y 63, far above the flat world's ground, and the band between the ground and that height is the black area that grows into the sky as the render distance shrinks.

What vanilla 26.3 does. ClientLevel.ClientLevelData:

public double getHorizonHeight(final LevelHeightAccessor level) {
   return this.isFlat ? level.getMinY() : 63.0;
}

public float voidDarknessOnsetRange() {
   return this.isFlat ? 1.0F : 32.0F;
}

So in a flat world the horizon is the level's minimum y and the void's darkness starts right at it, and the flag comes from CommonPlayerSpawnInfo.isFlat (the client keeps it in ClientLevelData.isFlat; the server side is ServerLevel.isFlat, which asks the world data whether it is a flat world). SkyRenderer.shouldRenderDarkDisc uses that height: the eye below level.getLevelData().getHorizonHeight(level) and not under water.

#2262 does exactly that: it reads the world's flat flag from the save (and from the remote server's spawn info on a client), passes the dimension's min_y and the flat flag to the fog and the sky, and uses the flat horizon for the dark disc.

Vanilla classes and methods: ClientLevel$ClientLevelData.getHorizonHeight, ClientLevel$ClientLevelData.voidDarknessOnsetRange, SkyRenderer.shouldRenderDarkDisc, CommonPlayerSpawnInfo.isFlat, ServerLevel.isFlat.

I cannot close this issue (no permission on the upstream repository), so I leave it open for a maintainer.

<!-- gh-comment-id:6434009946 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: this one is covered by #2262 ("Flat worlds: no black horizon, the dark disc and void fog use the flat horizon", kacpherek), which is open and waiting for review. I checked the current `main` against the pinned 26.3 client and the fix in that pull request is the right one, so I am not opening a competing pull request. Here is the evidence. **What is wrong on `main`.** The report is a flat world ("Created or entered a flat world"), and the black band is the sky's dark disc and the void fog drawn at the wrong height. In `crates/horizon-client/src/game/render_tick.rs` the fog and the sky are given: ```rust // level.getMinY(): the Nether and the End start at y 0. min_y: if self.dim == Dim::Overworld { MIN_Y } else { 0 }, flat: false, ``` so a superflat world (whose ground is at the level's minimum y) still gets the normal world's horizon at y 63 and is treated as a non-flat level. The dark disc and the void fog are then drawn at y 63, far above the flat world's ground, and the band between the ground and that height is the black area that grows into the sky as the render distance shrinks. **What vanilla 26.3 does.** `ClientLevel.ClientLevelData`: ```java public double getHorizonHeight(final LevelHeightAccessor level) { return this.isFlat ? level.getMinY() : 63.0; } public float voidDarknessOnsetRange() { return this.isFlat ? 1.0F : 32.0F; } ``` So in a flat world the horizon is the level's minimum y and the void's darkness starts right at it, and the flag comes from `CommonPlayerSpawnInfo.isFlat` (the client keeps it in `ClientLevelData.isFlat`; the server side is `ServerLevel.isFlat`, which asks the world data whether it is a flat world). `SkyRenderer.shouldRenderDarkDisc` uses that height: the eye below `level.getLevelData().getHorizonHeight(level)` and not under water. #2262 does exactly that: it reads the world's flat flag from the save (and from the remote server's spawn info on a client), passes the dimension's `min_y` and the flat flag to the fog and the sky, and uses the flat horizon for the dark disc. Vanilla classes and methods: `ClientLevel$ClientLevelData.getHorizonHeight`, `ClientLevel$ClientLevelData.voidDarknessOnsetRange`, `SkyRenderer.shouldRenderDarkDisc`, `CommonPlayerSpawnInfo.isFlat`, `ServerLevel.isFlat`. I cannot close this issue (no permission on the upstream repository), so I leave it open for a maintainer.
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#618
No description provided.