feat(render): retire world_offset — geometry is now absolute (P6 flip)

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 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-06-23 22:34:23 +03:00
1 parent cca1086696
commit b473f6a8cb
1 file changed
+8 -7
+8 -7
View File
@@ -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)
}