From 594929b7956bf3ef5206ceff880c3e9049a88fc4 Mon Sep 17 00:00:00 2001 From: Cosmic <84875247+Online5277@users.noreply.github.com> Date: Sat, 17 Oct 2026 18:13:20 -0400 Subject: [PATCH] Validate LOD loading, shader depth and current terrain draw paths --- crates/horizon-client/src/game.rs | 1 + crates/horizon-client/src/lod.rs | 26 ++++++-------------------- docs/graphics.md | 2 +- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 30d5c73c1..1151339a8 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -10694,6 +10694,7 @@ fn loading_frame(hud: &HudBatch) -> Frame<'_> { bob: glam::Mat4::IDENTITY, sky: horizon_client::environment::Sky::default(), distance: 12.0, + detail_distance: 12.0, depth_far: 1000.0, underwater: false, cave_culling: false, diff --git a/crates/horizon-client/src/lod.rs b/crates/horizon-client/src/lod.rs index 3d39c2639..59adc4e7e 100644 --- a/crates/horizon-client/src/lod.rs +++ b/crates/horizon-client/src/lod.rs @@ -326,10 +326,8 @@ impl Lod { } while let Ok(done) = self.results.try_recv() { self.pending.remove(&done.key); - if self.plan.nodes.contains(&done.key) { - if done.samples.len() == CELLS * CELLS { - self.ready.insert(done.key, done.samples); - } + if self.plan.nodes.contains(&done.key) && done.samples.len() == CELLS * CELLS { + self.ready.insert(done.key, done.samples); } } if self.covered != covered { @@ -397,6 +395,8 @@ impl Lod { "minecraft:lava" => Some(("block/lava_still", false, -1)), _ => None, }; + let light = + 240 | (u16::from(self.context.tables.facts(state).map_or(0, |f| f.emission)) << 12); let style = if let Some((sprite, translucent, tint)) = fluid { Style { layer: self @@ -414,14 +414,7 @@ impl Lod { .unwrap_or(0) as u16, tint, translucent, - light: 240 - | (self - .context - .tables - .facts(state) - .map_or(0, |f| u16::from(f.emission)) - * 16 - << 8), + light, } } else { let models = self @@ -443,14 +436,7 @@ impl Lod { -1 }, translucent: face.is_some_and(|f| f.translucent), - light: 240 - | (self - .context - .tables - .facts(state) - .map_or(0, |f| u16::from(f.emission)) - * 16 - << 8), + light, } }; self.styles.insert(state, style); diff --git a/docs/graphics.md b/docs/graphics.md index efd1dd00a..1d125a851 100644 --- a/docs/graphics.md +++ b/docs/graphics.md @@ -35,7 +35,7 @@ Which settings each level shows, their descriptions and costs are in `crates/hor **LOD Distance** is off by default. Enable it in Simple or Advanced graphics settings and choose 64, 128, 256, 512 or 1024 chunks. With LODs enabled, **Full Detail Distance** controls the nearby normal chunks; LOD Distance controls the outer view. Keep the nearby range modest, for example 12 chunks with a 256-chunk LOD distance. Increasing the distant range does not increase simulation distance. -Distant terrain uses progressively coarser surface meshes, streamed in bounded background work instead of loading full chunks out to the distant range. It is available in local Overworld and End worlds; surface LODs are disabled in the Nether. Far samples approximate undecorated terrain: distant caves, decorations, structures and player builds are not guaranteed to match the nearby world. Procedural distant terrain requires a local world's generator; remote servers do not supply their world-generation seed. +Distant terrain uses progressively coarser surface meshes, streamed in bounded background work instead of loading full chunks out to the distant range. It is available in local Overworld and End worlds; surface LODs are disabled in the Nether. Unknown terrain samples use noise/aquifer heights and surface materials, omitting caves, decorations, structures and slope-dependent extensions. Loaded and saved terrain supplies bounded surface summaries, including player edits; small details can disappear between samples. This is a surface approximation, not full block geometry. Procedural distant terrain requires a local world's generator; remote servers do not supply their world-generation seed. LOD terrain enters the existing world colour and depth passes, so supported shader-pack postprocessing can see it. This does not add Iris material passes or shadow maps: Java packs still have the [existing fullscreen-pass limitations](shader-packs.md). Shader appearance and transitions need testing with the selected pack.