fix(xbg7): degenerate index runs 582 -> 1 (grouped path + prefer a clean candidate)
Two follow-ups to the pad-scoring fix, both driven by the same invariant (a correctly located index run has no degenerate triangles): - anchor_grouped_meshes picked its pad by first-match too; scoring the pivot run the same way cleared every remaining ptc_pack composite (f102/f104/e107). - anchor_pool_mesh now prefers a degenerate-free candidate over an earlier dirty one. examples/better_home.rs showed the last two resources each had exactly one degenerate-free, pool-covering block, sitting later in file order than the lookalike we took. First-match order is kept for every clean hit, and a dirty block is still used if nothing clean exists, so coverage cannot regress. degenerate index runs, disc-wide: 582 -> 11 -> 1 captured index runs identical: 93/93 (unchanged) resources decoded / misses: 6 209 / 85 (unchanged) index runs changed / anchors moved: 590 / 10 (_rou_f402_dead x8, e201_bdy_03_m x2) Cross-container minority decodes 89 -> 96, and that is progress: all seven new rows are _rou_f402_dead, which now has a majority (32x25x8) for the first time, so its seven wrong copies are named instead of hidden behind "no majority". The last dirty run (_rou_f402_dead in Stage_S09) is blocked by distinct assignment — its clean block is claimed by e_rou_f003_Near, both 24-vertex bounding boxes. A winding-floor escalation for that case was written, measured to fire for nothing, and reverted; the reasoning is kept as a comment. Regression threshold tightened to 1. Suite green with --include-ignored apart from the pre-existing known-failing cross-container consistency test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NptfmpjdpNCKEez6d2xvA9
This commit is contained in:
@@ -67,6 +67,16 @@ fn main() {
|
||||
let where_ = f.file_name().unwrap().to_string_lossy().to_string();
|
||||
let mut c_moved = 0usize;
|
||||
for m in Xbg7Model::stage_models(&bytes) {
|
||||
// Degeneracy is counted over EVERY sub-mesh (grouped pools included —
|
||||
// they have their own pad choice); the pad-0 comparison below only
|
||||
// applies to single-block resources, whose run starts at `vb - 2n`.
|
||||
for sm in &m.meshes {
|
||||
let d = degenerate(&sm.indices);
|
||||
if d > 0 {
|
||||
still_degen += 1;
|
||||
worst.push((d, m.name.clone(), where_.clone()));
|
||||
}
|
||||
}
|
||||
if m.meshes.len() != 1 {
|
||||
continue;
|
||||
}
|
||||
@@ -98,11 +108,6 @@ fn main() {
|
||||
weak_wind.push((w0, w2, m.name.clone()));
|
||||
}
|
||||
}
|
||||
let d = degenerate(&sm.indices);
|
||||
if d > 0 {
|
||||
still_degen += 1;
|
||||
worst.push((d, m.name.clone(), where_.clone()));
|
||||
}
|
||||
}
|
||||
if c_moved > 0 {
|
||||
println!("{where_:<24} {c_moved} resources read from a non-pad-0 index run");
|
||||
|
||||
Reference in New Issue
Block a user