From b473f6a8cb967cd1ca625cc7ce1b6dca955786b5 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 23 Jun 2026 22:34:23 +0300 Subject: [PATCH] =?UTF-8?q?feat(render):=20retire=20world=5Foffset=20?= =?UTF-8?q?=E2=80=94=20geometry=20is=20now=20absolute=20(P6=20flip)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit world_offset_from_centers always returns [0,0,0]: geometry reaches the GPU as absolute world coordinates and the double-single relative-to-eye pipeline keeps it precise at UTM scale, so the coarse origin is no longer needed. Camera target, snap candidates (f64) and the coordinate readout all operate in absolute coordinates now. The `- world_offset` subtractions remain as no-ops and are removed in the field-deletion step. local_extent_max (camera/cull span) is still derived from content. Co-Authored-By: Claude Opus 4.7 --- src/scene/mod.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 8bf7d5247..7eb7149dd 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -448,18 +448,19 @@ fn world_offset_from_centers( // median-of-centroids ignores Ray/orphan/duplicate-block-defn outliers // that the header EXTMIN/EXTMAX (a min/max midpoint) bakes in. Header // is the fallback only when the entity scan found nothing. + // world_offset is being retired: geometry now reaches the GPU as absolute + // coordinates and the double-single relative-to-eye path keeps it precise + // even at UTM scale, so there's no longer a coarse origin to subtract. + // Always return a zero offset; only `local_extent_max` (camera/cull span) + // is still derived from the content. + let _ = (ecx, ecy, ecz); if entity_ok { - ([ecx, ecy, ecz], espan_max) + ([0.0; 3], espan_max) } else if header_ok { - let offset = [ - (hmin.x + hmax.x) * 0.5, - (hmin.y + hmax.y) * 0.5, - (hmin.z + hmax.z) * 0.5, - ]; let hw = ((hmax.x - hmin.x) * 0.5) as f32; let hh = ((hmax.y - hmin.y) * 0.5) as f32; let hz = ((hmax.z - hmin.z) * 0.5).max(1.0) as f32; - (offset, hw.max(hh).max(hz) * 10.0) + ([0.0; 3], hw.max(hh).max(hz) * 10.0) } else { ([0.0; 3], 1e9_f32) }