code wiki / (root) / nx_gsplat_density_gate.nx

nx_gsplat_density_gate.nx

buildroot/runtime/nx_gsplat_density_gate.nx

16883 B267 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic gsplat
docsdependenciesstructsconstsfunctions

about

nx_gsplat_density_gate.nx -- ADAPTIVE DENSITY: does adding primitives where the residual asks for them actually reconstruct better, or is it tessellating noise? *** THE ACCEPT RULE, PRE-DECLARED BEFORE THE IMPLEMENTATION WAS WRITTEN *** A before/after comparison is NOT good enough here and the reason is specific: densification changes the primitive count, so "loss fell after densifying" is satisfied by simply fitting longer. The two arms therefore get the SAME TOTAL FITTING BUDGET and differ only in whether density is adapted: ARM A (control): 2*FD_STEPS gradient steps at the starting count, no densification ARM B : FD_STEPS steps, ONE densify, FD_STEPS steps ACCEPT iff lossB < lossA. Densification then has to earn its result against the fitter working equally hard without it -- which is the only comparison that can distinguish adapting density from spending more iterations. *** REACHABILITY IS ASSERTED FIRST, ARITHMETICALLY, BEFORE ANY ARM IS BELIEVED -- AND IT IS TWO *** QUESTIONS, NOT ONE. THIS GATE'S FIRST RED PROVED THAT, AGAINST ITS OWN AUTHOR. v1 built a fixture whose third feature lay BEYOND every primitive's support and asserted exactly that as its reachability tooth. The tooth PASSED and the run came back RED with gmean=0 -- because the gradient is accumulated ONLY over each primitive's own footprint, so a feature that no primitive touches contributes NOTHING to any gradient. The densifier could not feel the residual it was being asked to fix. THE FIXTURE PROVED THE WRONG REACHABILITY, AND THE TOOTH CERTIFIED IT. T0a SIGNAL reachable -- the unresolved detail must lie INSIDE the covering primitive's support, or no gradient carries it and no criterion can ever fire. T0b IMPROVEMENT reachable -- that detail must be separated by more than the information floor of one pixel, or more primitives cannot represent what one cannot. Both are computed from the LIVE conic (gs_splat_rx on the rendered pa), never from a comment. ⚠AND THE UNDERLYING LIMIT IS REAL AND SHARED WITH PUBLISHED 3DGS: densification GROWS primitives where support already exists; it does not DISCOVER regions nothing covers. Those are the business of initialisation (a point cloud), not of adaptive density. Naming it here so the next reader does not re-file this fixture bug as a densifier bug. *** THE ANTI-VACUITY TOOTH, AND THE FAILURE IT IS BUILT FROM *** The sibling gate's T14 v1 asserted only `mv_full > 0` -- a bound ANY number satisfies -- and so it PASSED on a result 46 billion units out. The vacuous-tooth defect, committed inside the gate built to prevent it. The bounds here are ones only a working implementation can meet: T4 out > in -- a "densified" run that silently added nothing FAILS T6 lossB < lossA -- at equal budget; a fit that ends no better than the control has bought nothing, and one that ends WORSE has diverged T7 both at once -- adding primitives without reducing residual IS tessellating noise, so neither half alone is allowed to carry the verdict T6's bound is the CONTROL's own measured loss, not a chosen epsilon -- there is no tunable number in

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_itrig.nx nx_gsplat.nx nx_gsplat_density.nx nx_gate_verdict.nx nx_gsplat_density_gate.nx

imports: nx_syscalls.nxnx_itrig.nxnx_gsplat.nxnx_gsplat_density.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gs_stride_aniso gs_w gs_h gs_focal_for sys_mmap ↻ gs_nb gs_expn gd_stat_count gs_build_explut fd_truth gs_set_aniso gs_render_aniso_at gs_project_sort_at it_sin4096 it_cos4096 it_sin4096 ↻ gs_isqrt vm_isqrt gs_proj_x_at gs_proj_y_at

structs

none

consts

55const FD_NGMAX: i64 = 16
56const FD_START: i64 = 2
57const FD_TRUTH: i64 = 3
58const FD_STEPS: i64 = 10
59const FD_CAMZ: i64 = 30
60const FD_RTAN: i64 = 560
65const FD_PAIR: i64 = 400
68const FD_FAR: i64 = 5000
69const FD_TILT: i64 = 181
70const FD_W64: i64 = 8
71const FD_BGR: i64 = 26
72const FD_BGG: i64 = 28
73const FD_BGB: i64 = 44
74const FD_OP: i64 = 200

functions

76func fd_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
78func fd_truth(g: *i64) -> i64
called by 1: main calls 1: gs_set_aniso
93func fd_start(g: *i64) -> i64
called by 1: main calls 1: gs_set_aniso
99func fd_copy(dst: *i64, src: *i64, n: i64) -> i64
called by 1: main
105func main() -> i64