nx_gsplat_fit_gate.nx
buildroot/runtime/nx_gsplat_fit_gate.nx
about
nx_gsplat_fit_gate.nx -- THE RECONSTRUCTOR TOOTH: can we FIT gaussians to an image, or only PLACE them?
WHY THIS GATE EXISTS. Until 2026-08-23 nx_gsplat could optimise COLOUR only. Colour is the easy leg --
a pixel is LINEAR in colour, so the gradient is analytic and a step cannot really go wrong. Position is
what 3D Gaussian Splatting actually IS: without it we have a splat RENDERER, not a splat RECONSTRUCTOR,
and the whole photoreal-avatar lane rests on reconstruction. gs_pos_grad_step adds the position leg.
★★THE ACCEPT RULE IS DECLARED HERE, BEFORE THE EXPERIMENT, and it is deliberately threshold-free:
MONOTONE RECOVERY -- the mean |position - truth| must STRICTLY DECREASE at EVERY step. Not "drops
below X", which is a number nobody measured; strict monotonicity over the whole run. This is the
ANTI-VACUITY tooth and it is the reason the gate exists:
- an implementation whose position gradient is ZERO leaves the error EXACTLY constant -> FAILS
- an implementation that JITTERS reduces error sometimes and raises it others -> FAILS
- only a gradient that actually points downhill can decrease it every single step.
A loss-only tooth would pass all three, which is why loss is reported but is NOT the accept rule.
★AND THE OPTIMUM IS A CONTROL, NOT AN ASSUMPTION. T5 runs the SAME step on a scene ALREADY at truth.
A correct gradient is ~0 there and the scene must stay put; a jittering one wanders. The bite is asked
both directions -- fires on the perturbed scene, silent on the converged one -- because a step that
moves everything passes every "it moved" check ever written.
⚠FIXTURE HONOURS THE DECLARED APPROXIMATION. gs_pos_grad_step ignores transmittance (stated in its
own header), so the fixture separates every gaussian in DEPTH: the approximation is exact for a
non-overlapping scene, and testing an organ outside its declared domain measures the fixture.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gsplat.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
structs
| none |
consts
| 30 | const FG_NG: i64 = 8 |
| 31 | const FG_STEPS: i64 = 12 |
| 32 | const FG_CAMZ: i64 = 30 |
| 33 | const FG_SC: i64 = 400 |
| 34 | const FG_XSTEP: i64 = 2600 |
| 35 | const FG_ZSTEP: i64 = 900 |
| 36 | const FG_PERTURB: i64 = 300 // world units; see T1 for its size in PIXELS, which is what matters |
| 37 | const FG_W64: i64 = 8 |
| 38 | const FG_BGR: i64 = 26 |
| 39 | const FG_BGG: i64 = 28 |
| 40 | const FG_BGB: i64 = 44 |
functions
| 42 | func fg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: fg_poserr |
| 45 | func fg_truth(g: *i64) -> i64 |
| 56 | func fg_copy(dst: *i64, src: *i64, n: i64) -> i64 called by 1: main |
| 62 | func fg_poserr(g: *i64, t: *i64) -> i64 |
| 72 | func main() -> i64 |